summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-09-09 18:31:55 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-09-09 18:31:55 +0300
commit611e0a2e38d624ed22270f2148323c320df5cc39 (patch)
treed5850fd4cc56dc6524433739b2d78dfb53cd9bf6 /indra/newview
parent645508e4e197755541a44ee3f3ee8d2ba7c8b0c8 (diff)
SL-11315 Fix paddings for checkbox
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltoastnotifypanel.cpp11
-rw-r--r--indra/newview/lltoastpanel.cpp4
2 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 65684dc2fd..83009a78d4 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -411,14 +411,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 * 3, 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);
}
diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp
index d69f918a54..1abd35d931 100644
--- a/indra/newview/lltoastpanel.cpp
+++ b/indra/newview/lltoastpanel.cpp
@@ -211,7 +211,9 @@ bool LLCheckBoxToastPanel::setCheckBox(const std::string& check_title,
// set check_box's attributes
LLRect check_rect;
- mCheck->setRect(check_rect.setOriginAndSize(msg_x, v_pad + BTN_HEIGHT + LINE_HEIGHT / 2, max_msg_width, LINE_HEIGHT*lines.size()));
+ // if we are part of the toast, we need to leave space for buttons
+ S32 msg_y = v_pad + (parent_view ? 0 : (BTN_HEIGHT + LINE_HEIGHT / 2));
+ mCheck->setRect(check_rect.setOriginAndSize(msg_x, msg_y, max_msg_width, LINE_HEIGHT*lines.size()));
mCheck->setLabel(check_title);
mCheck->setCommitCallback(cb);