diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-08-29 01:57:44 +0300 |
---|---|---|
committer | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-09-04 23:20:13 +0200 |
commit | f059ace6f79cd2866fab7027ca22188c806799f8 (patch) | |
tree | 8050ecb5750760c5071c69c7584cc23c248949f0 | |
parent | 1a89ff73ac210f596887443013857a8ed88a9a00 (diff) |
SL-20205 Clipping of label "Water"
-rw-r--r-- | indra/llui/lltextbase.cpp | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_region_environment.xml | 20 |
2 files changed, 17 insertions, 11 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 26a38bd541..b6d27a3211 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1550,7 +1550,13 @@ S32 LLTextBase::getLeftOffset(S32 width) case LLFontGL::HCENTER: return mHPad + llmax(0, (mVisibleTextRect.getWidth() - width - mHPad) / 2); case LLFontGL::RIGHT: - return mVisibleTextRect.getWidth() - width; + { + // Font's rendering rounds string size, if value gets rounded + // down last symbol might not have enough space to render, + // compensate by adding an extra pixel as padding + const S32 right_padding = 1; + return llmax(mHPad, mVisibleTextRect.getWidth() - width - right_padding); + } default: return mHPad; } diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml index edf1e1efd4..0b3639f779 100644 --- a/indra/newview/skins/default/xui/en/panel_region_environment.xml +++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml @@ -259,7 +259,7 @@ follows="left|top" layout="topleft" height="24" - width="52" + width="53" left_delta="2" top_pad="1" halign="right" @@ -271,7 +271,7 @@ follows="left|top" enabled="false" top_delta="3" - left_pad="21" + left_pad="20" height="20" layout="topleft" name="edt_invname_alt1" @@ -305,7 +305,7 @@ follows="left|top" layout="topleft" height="24" - width="52" + width="53" left_delta="2" top_pad="1" halign="right" @@ -317,7 +317,7 @@ follows="left|top" enabled="false" top_delta="3" - left_pad="21" + left_pad="20" height="20" layout="topleft" name="edt_invname_alt2" @@ -351,7 +351,7 @@ follows="left|top" layout="topleft" height="25" - width="52" + width="53" left_delta="2" top_pad="1" halign="right" @@ -363,7 +363,7 @@ follows="left|top" enabled="false" top_delta="3" - left_pad="21" + left_pad="20" height="20" layout="topleft" name="edt_invname_alt3" @@ -460,7 +460,7 @@ follows="left|top" layout="topleft" height="12" - width="52" + width="53" left_delta="2" top_pad="2" halign="right" @@ -477,7 +477,7 @@ mouse_opaque="false" visible="true" top_delta="-3" - left_pad="2"/> + left_pad="1"/> <line_editor follows="left|top" enabled="false" @@ -516,7 +516,7 @@ follows="left|top" layout="topleft" height="12" - width="52" + width="53" left_delta="2" top_pad="2" halign="right" @@ -533,7 +533,7 @@ mouse_opaque="false" visible="true" top_delta="-3" - left_pad="2"/> + left_pad="1"/> <line_editor follows="left|top" enabled="false" |