diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-12-18 07:08:59 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-12-18 07:57:29 +0200 |
commit | c87850ddab5604e57fdcebad6a53616232a1b648 (patch) | |
tree | 47da586a3b93b1cbd9af9db5f81f65bf066306cd /indra/llui/lltextbase.cpp | |
parent | f5a7c22cea16b51db12360436ce64c2433a5aa5f (diff) | |
parent | a592292242e29d0379ee72572a434359e1e892d1 (diff) |
Merge branch 'main' into DRTVWR-591-maint-X
# Conflicts:
# doc/contributions.txt
# indra/newview/llpanelprofile.cpp
# indra/newview/llspatialpartition.cpp
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r-- | indra/llui/lltextbase.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 8732a7ce45..e0697cb454 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; } |