summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderviewitem.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-09-07 20:20:18 +0300
committerGitHub <noreply@github.com>2024-09-07 20:20:18 +0300
commit2e886b7cfef14d087c2167e3384e9e19dcb3ff63 (patch)
tree69c67eec8a621b04cf15f04b86b16b33baebe079 /indra/llui/llfolderviewitem.cpp
parent9ce23ccc5ea75442fd44173befdadaf6cc9d2ec2 (diff)
parent4a00280b892ea82d2c0732ab52778a2c19bdc810 (diff)
Merge pull request #2521 from secondlife/andreyk/viewer_2411
viewer#2411 Use font buffer for inventory
Diffstat (limited to 'indra/llui/llfolderviewitem.cpp')
-rw-r--r--indra/llui/llfolderviewitem.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index e4f5664908..2879f0354f 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -307,6 +307,7 @@ void LLFolderViewItem::refresh()
LLFolderViewModelItem& vmi = *getViewModelItem();
mLabel = utf8str_to_wstring(vmi.getDisplayName());
+ mLabelFontBuffer.reset();
setToolTip(vmi.getName());
// icons are slightly expensive to get, can be optimized
// see LLInventoryIcon::getIcon()
@@ -320,6 +321,7 @@ void LLFolderViewItem::refresh()
// Can do a number of expensive checks, like checking active motions, wearables or friend list
mLabelStyle = vmi.getLabelStyle();
mLabelSuffix = utf8str_to_wstring(vmi.getLabelSuffix());
+ mSuffixFontBuffer.reset();
}
// Dirty the filter flag of the model from the view (CHUI-849)
@@ -890,7 +892,7 @@ void LLFolderViewItem::drawLabel(const LLFontGL * font, const F32 x, const F32 y
//--------------------------------------------------------------------------------//
// Draw the actual label text
//
- font->render(mLabel, 0, x, y, color,
+ mLabelFontBuffer.render(font, mLabel, 0, x, y, color,
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
S32_MAX, getRect().getWidth() - (S32) x - mLabelPaddingRight, &right_x, /*use_ellipses*/true);
}
@@ -999,9 +1001,9 @@ void LLFolderViewItem::draw()
//
if (!mLabelSuffix.empty())
{
- suffix_font->render( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : sSuffixColor.get(),
- LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
- S32_MAX, S32_MAX, &right_x);
+ mSuffixFontBuffer.render(suffix_font, mLabelSuffix, 0, right_x, y, isFadeItem() ? color : sSuffixColor.get(),
+ LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
+ S32_MAX, S32_MAX, &right_x);
}
//--------------------------------------------------------------------------------//