diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-12-15 18:28:43 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-12-15 18:28:43 +0800 |
commit | 91b49c8bfa061f3d3b8601d5398b1889a9e31850 (patch) | |
tree | 98adc151491a2bee51a70cf7dd37de21d4f32bb3 /indra/llui/lltextbase.cpp | |
parent | 0cce0b8149e049161ab17f1c608ded2d6cc12b0e (diff) | |
parent | a80e3fe4191aee87c566937953d52fa6498b7f32 (diff) |
Merge tag '7.1.1-release'
source for viewer 7.1.1.7039128750
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; } |