summaryrefslogtreecommitdiff
path: root/indra/llui/llbutton.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-07-27 19:37:18 +0300
committerGitHub <noreply@github.com>2024-07-27 19:37:18 +0300
commit0a6f28209e2be86462428a6f779b465e3604e831 (patch)
treeb968655ced36ef127b028819e9edb509861a76ca /indra/llui/llbutton.cpp
parente008b44fd88be83426812e67707896e970947c49 (diff)
parent817bc25b2732dc23295e6a7ac0da5ad142e33434 (diff)
Merge branch 'develop' into marchcat/b-develop
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r--indra/llui/llbutton.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 9e1e3ba120..7b612e445b 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -796,9 +796,6 @@ void LLButton::draw()
if( ll::ui::SearchableControl::getHighlighted() )
label_color = ll::ui::SearchableControl::getHighlightColor();
- // Unselected label assignments
- LLWString label = getCurrentLabel();
-
// overlay with keyboard focus border
if (hasFocus())
{
@@ -927,8 +924,9 @@ void LLButton::draw()
}
// Draw label
- if( !label.empty() )
+ if( !getCurrentLabel().empty() ) // Unselected label assignments
{
+ LLWString label = getCurrentLabel();
LLWStringUtil::trim(label);
S32 x;
@@ -1082,10 +1080,10 @@ void LLButton::autoResize()
resize(getCurrentLabel());
}
-void LLButton::resize(LLUIString label)
+void LLButton::resize(const LLUIString& label)
{
// get label length
- S32 label_width = mGLFont->getWidth(label.getString());
+ S32 label_width = mGLFont->getWidth(label.getWString().c_str());
// get current btn length
S32 btn_width =getRect().getWidth();
// check if it need resize