diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-07-26 06:19:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 13:19:34 +0300 |
commit | 604cb4cb4dd71c0f90633e50d5b0108e3901c4ad (patch) | |
tree | 71f6fbbd3278cebceb755c6543268b3cb7ef5d28 /indra/llui/llcontainerview.cpp | |
parent | bc50d2c7d57618846a6cb318cd12e006270b64ae (diff) |
Reduce utf8 to wstring conversion and llwstring temporaries during text draw (#2115)
Diffstat (limited to 'indra/llui/llcontainerview.cpp')
-rw-r--r-- | indra/llui/llcontainerview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llui/llcontainerview.cpp b/indra/llui/llcontainerview.cpp index 4c2912cde6..b414e4354d 100644 --- a/indra/llui/llcontainerview.cpp +++ b/indra/llui/llcontainerview.cpp @@ -46,7 +46,7 @@ static ContainerViewRegistry::Register<LLPanel> r3("panel", &LLPanel::fromXML); LLContainerView::LLContainerView(const LLContainerView::Params& p) : LLView(p), mShowLabel(p.show_label), - mLabel(p.label), + mLabel(utf8str_to_wstring(p.label)), mDisplayChildren(p.display_children) { mScrollContainer = NULL; @@ -120,8 +120,8 @@ void LLContainerView::draw() // Draw the label if (mShowLabel) { - LLFontGL::getFontMonospace()->renderUTF8( - mLabel, 0, 2, getRect().getHeight() - 2, LLColor4(1,1,1,1), LLFontGL::LEFT, LLFontGL::TOP); + LLFontGL::getFontMonospace()->render( + mLabel, 0, 2.f, (F32)(getRect().getHeight() - 2), LLColor4(1,1,1,1), LLFontGL::LEFT, LLFontGL::TOP); } LLView::draw(); @@ -285,7 +285,7 @@ LLRect LLContainerView::getRequiredRect() void LLContainerView::setLabel(const std::string& label) { - mLabel = label; + mLabel = utf8str_to_wstring(label); } void LLContainerView::setDisplayChildren(bool displayChildren) |