summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastnotifypanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoastnotifypanel.cpp')
-rw-r--r--indra/newview/lltoastnotifypanel.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 65684dc2fd..bccf88128d 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -163,6 +163,11 @@ void LLToastNotifyPanel::updateButtonsLayout(const std::vector<index_button_pair
{
left = (max_width - btn_rect.getWidth()) / 2;
}
+ else if (left == 0 && buttons.size() == 2)
+ {
+ // Note: this and "size() == 1" shouldn't be inside the cycle, might be good idea to refactor whole placing process
+ left = (max_width - (btn_rect.getWidth() * 2) - h_pad) / 2;
+ }
else if (left + btn_rect.getWidth() > max_width)// whether there is still some place for button+h_pad in the mControlPanel
{
// looks like we need to add button to the next row
@@ -411,14 +416,17 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
//can shift upward making room for the buttons inside mControlPanel. After the buttons are added, the info panel can then be set to follow 'all'.
mInfoPanel->setFollowsAll();
- // Add checkboxes if nessesary.
- setCheckBoxes(HPAD * 3, VPAD * 4, mInfoPanel);
-
+ // Add checkbox (one of couple types) if nessesary.
+ setCheckBoxes(HPAD * 2, 0, mInfoPanel);
+ if (mCheck)
+ {
+ mCheck->setFollows(FOLLOWS_BOTTOM | FOLLOWS_LEFT);
+ }
// Snap to message, then to checkbox if present
snapToMessageHeight(mTextBox, LLToastPanel::MAX_TEXT_LENGTH);
if (mCheck)
{
- S32 new_panel_height = mCheck->getRect().getHeight() + getRect().getHeight();
+ S32 new_panel_height = mCheck->getRect().getHeight() + getRect().getHeight() + VPAD;
reshape(getRect().getWidth(), new_panel_height);
}