diff options
author | Nicky <nicky.dasmijn@posteo.nl> | 2024-08-03 14:30:06 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@posteo.nl> | 2024-08-03 14:30:06 +0200 |
commit | 04c47b95323a8022785e58fec03c14769ddfa6af (patch) | |
tree | 2e781e03d8af6bc231f9340b1e289234c363ff20 /indra/llui/llscrolllistcell.cpp | |
parent | f480075e1ffbcc026843a3d14fd6533aad1e7126 (diff) | |
parent | 2ee039c736f64c91bb4f16e403360cddb0089707 (diff) |
Merge remote-tracking branch 'll/marchcat/b-develop' into feature/warning_cleansweep
Diffstat (limited to 'indra/llui/llscrolllistcell.cpp')
-rw-r--r-- | indra/llui/llscrolllistcell.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp index 5dccf9a8ba..88ef4eb0c1 100644 --- a/indra/llui/llscrolllistcell.cpp +++ b/indra/llui/llscrolllistcell.cpp @@ -305,7 +305,7 @@ bool LLScrollListText::needsToolTip() const return LLScrollListCell::needsToolTip(); // ...otherwise, show tooltips for truncated text - return mFont->getWidth(mText.getString()) > getWidth(); + return mFont->getWidth(mText.getWString().c_str()) > getWidth(); } //virtual @@ -328,7 +328,7 @@ LLScrollListText::~LLScrollListText() S32 LLScrollListText::getContentWidth() const { - return mFont->getWidth(mText.getString()); + return mFont->getWidth(mText.getWString().c_str()); } @@ -394,18 +394,18 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col switch(mFontAlignment) { case LLFontGL::LEFT: - left = mFont->getWidth(mText.getString(), 1, mHighlightOffset); + left = mFont->getWidth(mText.getWString().c_str(), 1, mHighlightOffset); break; case LLFontGL::RIGHT: - left = getWidth() - mFont->getWidth(mText.getString(), mHighlightOffset, S32_MAX); + left = getWidth() - mFont->getWidth(mText.getWString().c_str(), mHighlightOffset, S32_MAX); break; case LLFontGL::HCENTER: - left = (getWidth() - mFont->getWidth(mText.getString())) / 2; + left = (getWidth() - mFont->getWidth(mText.getWString().c_str())) / 2; break; } LLRect highlight_rect(left - 2, mFont->getLineHeight() + 1, - left + mFont->getWidth(mText.getString(), mHighlightOffset, mHighlightCount) + 1, + left + mFont->getWidth(mText.getWString().c_str(), mHighlightOffset, mHighlightCount) + 1, 1); mRoundedRectImage->draw(highlight_rect, highlight_color); } @@ -613,18 +613,18 @@ void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight switch (mFontAlignment) { case LLFontGL::LEFT: - left = mFont->getWidth(mText.getString(), icon_space + 1, mHighlightOffset); + left = mFont->getWidth(mText.getWString().c_str(), icon_space + 1, mHighlightOffset); break; case LLFontGL::RIGHT: - left = getWidth() - mFont->getWidth(mText.getString(), mHighlightOffset, S32_MAX) - icon_space; + left = getWidth() - mFont->getWidth(mText.getWString().c_str(), mHighlightOffset, S32_MAX) - icon_space; break; case LLFontGL::HCENTER: - left = (getWidth() - mFont->getWidth(mText.getString()) - icon_space) / 2; + left = (getWidth() - mFont->getWidth(mText.getWString().c_str()) - icon_space) / 2; break; } LLRect highlight_rect(left - 2, mFont->getLineHeight() + 1, - left + mFont->getWidth(mText.getString(), mHighlightOffset, mHighlightCount) + 1, + left + mFont->getWidth(mText.getWString().c_str(), mHighlightOffset, mHighlightCount) + 1, 1); mRoundedRectImage->draw(highlight_rect, highlight_color); } @@ -642,12 +642,12 @@ void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight break; case LLFontGL::RIGHT: start_text_x = (F32)getWidth(); - start_icon_x = getWidth() - mFont->getWidth(mText.getString()) - icon_space; + start_icon_x = getWidth() - mFont->getWidth(mText.getWString().c_str()) - icon_space; break; case LLFontGL::HCENTER: F32 center = (F32)getWidth()* 0.5f; start_text_x = center + ((F32)icon_space * 0.5f); - start_icon_x = (S32)(center - (((F32)icon_space + mFont->getWidth(mText.getString())) * 0.5f)); + start_icon_x = (S32)(center - (((F32)icon_space + mFont->getWidth(mText.getWString().c_str())) * 0.5f)); break; } mFont->render(mText.getWString(), 0, |