diff options
| author | RunitaiLinden <davep@lindenlab.com> | 2024-01-19 11:36:56 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-19 11:36:56 -0600 |
| commit | 6dd260c3699148b4ddf8e7bff84f4b19f8bbf076 (patch) | |
| tree | 6c9144f701ecb2cda859baaeed4e2f4ee6f9a683 /indra/llui/lltextbase.cpp | |
| parent | 45547c7bbadf15804f54bb28fd1c94eb5f080bf5 (diff) | |
| parent | 09ee84f675cf08f98cbd49516c5e01c289b42a20 (diff) | |
Merge branch 'release/materials_featurette' into DRTVWR-592
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; } |
