diff options
| author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2026-04-23 01:42:02 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-23 01:42:02 +0300 |
| commit | 84f50b9deccf239e59a7d6391ae4cb5d77aa4d54 (patch) | |
| tree | f1654cba28953dfaa8a83dc4061529a1bc089297 /indra/newview/lltoastnotifypanel.cpp | |
| parent | df5e1c1613798b51fb516c63a52fdbf8b8419fee (diff) | |
| parent | b265859fb4d4edea9a2797debabea1c0b611f671 (diff) | |
Merge pull request #5688 from secondlife/maxim/2026.02-xui-font-updates
#5693 UI updates related to font hinting
Diffstat (limited to 'indra/newview/lltoastnotifypanel.cpp')
| -rw-r--r-- | indra/newview/lltoastnotifypanel.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 6c0b3bfa13..846642841a 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -46,7 +46,7 @@ const S32 BOTTOM_PAD = VPAD * 3; const S32 IGNORE_BTN_TOP_DELTA = 3*VPAD;//additional ignore_btn padding -S32 BUTTON_WIDTH = 90; +S32 BUTTON_WIDTH = 110; //static @@ -362,8 +362,20 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) } else { - const S32 button_panel_width = mControlPanel->getRect().getWidth();// do not change width of the panel + S32 button_panel_width = mControlPanel->getRect().getWidth();// get initial width from XML S32 button_panel_height = mControlPanel->getRect().getHeight(); + + // width for 3 columns: 3 buttons + 2 gaps + S32 min_width_required = 3 * BUTTON_WIDTH + 2 * (2 * HPAD); + if (min_width_required > button_panel_width) + { + button_panel_width = min_width_required; + S32 width_increase = button_panel_width - mControlPanel->getRect().getWidth(); + reshape(getRect().getWidth() + width_increase, getRect().getHeight()); + mInfoPanel->reshape(mInfoPanel->getRect().getWidth() + width_increase, mInfoPanel->getRect().getHeight()); + mTextBox->reshape(mTextBox->getRect().getWidth() + width_increase, mTextBox->getRect().getHeight()); + } + //try get an average h_pad to spread out buttons S32 h_pad = (button_panel_width - buttons_width) / (S32(buttons.size())); if(h_pad < 2*HPAD) |
