From f059ace6f79cd2866fab7027ca22188c806799f8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 29 Aug 2023 01:57:44 +0300 Subject: SL-20205 Clipping of label "Water" --- indra/llui/lltextbase.cpp | 8 +++++++- .../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"/> + left_pad="1"/>