summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-01-04 20:26:23 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-01-04 20:32:58 +0200
commitba47d9315470049bc19a7c07b6a333f56b490bad (patch)
treed302f266fe265696226ce80378e4515fb231faf1
parent6ec194154be3d40f897d728925d1a565c6f8be78 (diff)
SL-14491 llDialog spacing inconsistent between string and buttons
-rwxr-xr-xdoc/contributions.txt2
-rw-r--r--indra/newview/lltoastnotifypanel.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index bbdfaf655d..c33bc2607f 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -358,6 +358,8 @@ Chaser Zaks
BUG-227485
Cherry Cheevers
ChickyBabes Zuzu
+Chorazin Allen
+ BUG-229753
Christopher Organiser
Ciaran Laval
Cinder Roxley
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index bccf88128d..024f25bc98 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -387,9 +387,9 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
if (mIsScriptDialog)
{
// we are using default width for script buttons so we can determinate button_rows
- //to get a number of rows we divide the required width of the buttons to button_panel_width
- S32 button_rows = llceil(F32(buttons.size() - 1) * (BUTTON_WIDTH + h_pad) / button_panel_width);
- //S32 button_rows = (buttons.size() - 1) * (BUTTON_WIDTH + h_pad) / button_panel_width;
+ // to get a number of rows we divide the required width of the buttons to button_panel_width
+ // buttons.size() is reduced by -2 due to presence of ignore button which is calculated independently a bit lower
+ S32 button_rows = llceil(F32(buttons.size() - 2) * (BUTTON_WIDTH + h_pad) / (button_panel_width + h_pad));
//reserve one row for the ignore_btn
button_rows++;
//calculate required panel height for scripdialog notification.