diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-07-27 19:37:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-27 19:37:18 +0300 |
commit | 0a6f28209e2be86462428a6f779b465e3604e831 (patch) | |
tree | b968655ced36ef127b028819e9edb509861a76ca /indra/llui/llbutton.cpp | |
parent | e008b44fd88be83426812e67707896e970947c49 (diff) | |
parent | 817bc25b2732dc23295e6a7ac0da5ad142e33434 (diff) |
Merge branch 'develop' into marchcat/b-develop
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r-- | indra/llui/llbutton.cpp | 10 |
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 |