From 97b0ba2a6d2596da867043077e32065653d44f6e Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 19 Apr 2023 01:39:42 +0200 Subject: SL-19575 LLFloaterEmojiPicker - Add filter by category --- indra/llui/llbutton.cpp | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'indra/llui/llbutton.cpp') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 3354cb2db3..aeeff0b36f 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -68,6 +68,7 @@ LLButton::Params::Params() label_shadow("label_shadow", true), auto_resize("auto_resize", false), use_ellipses("use_ellipses", false), + use_font_color("use_font_color", false), image_unselected("image_unselected"), image_selected("image_selected"), image_hover_selected("image_hover_selected"), @@ -160,6 +161,7 @@ LLButton::LLButton(const LLButton::Params& p) mDropShadowedText(p.label_shadow), mAutoResize(p.auto_resize), mUseEllipses( p.use_ellipses ), + mUseFontColor( p.use_font_color), mHAlign(p.font_halign), mLeftHPad(p.pad_left), mRightHPad(p.pad_right), @@ -960,7 +962,7 @@ void LLButton::draw() LLFontGL::NORMAL, mDropShadowedText ? LLFontGL::DROP_SHADOW_SOFT : LLFontGL::NO_SHADOW, S32_MAX, text_width, - NULL, mUseEllipses); + NULL, mUseEllipses, mUseFontColor); } LLUICtrl::draw(); @@ -1020,6 +1022,16 @@ BOOL LLButton::toggleState() return flipped; } +void LLButton::setLabel( const std::string& label ) +{ + mUnselectedLabel = mSelectedLabel = label; +} + +void LLButton::setLabel( const LLUIString& label ) +{ + mUnselectedLabel = mSelectedLabel = label; +} + void LLButton::setLabel( const LLStringExplicit& label ) { setLabelUnselected(label); @@ -1051,14 +1063,7 @@ bool LLButton::labelIsTruncated() const const LLUIString& LLButton::getCurrentLabel() const { - if( getToggleState() ) - { - return mSelectedLabel; - } - else - { - return mUnselectedLabel; - } + return getToggleState() ? mSelectedLabel : mUnselectedLabel; } void LLButton::setImageUnselected(LLPointer image) -- cgit v1.2.3 From ae91ae43a51c58cc496f3947921fbf886c6be86e Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 15 Jan 2024 23:20:24 +0100 Subject: SL-20795 Part of previously typed emojis disappear in the 'Save settings as a preset...' option of the 'Preferences' floater --- indra/llui/llbutton.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llbutton.cpp') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 5ce1cbd63c..9ef019840a 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -68,7 +68,7 @@ LLButton::Params::Params() label_shadow("label_shadow", true), auto_resize("auto_resize", false), use_ellipses("use_ellipses", false), - use_font_color("use_font_color", false), + use_font_color("use_font_color", true), image_unselected("image_unselected"), image_selected("image_selected"), image_hover_selected("image_hover_selected"), -- cgit v1.2.3