From 264d9c32d9e04df0ceeaf2a63f6872aad29dd46a Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 28 Jul 2023 18:42:57 +0200 Subject: [PATCH] SL-20088 EmojiPicker - replace the image on the activation button with an emoji --- indra/llui/lluistring.h | 1 + indra/newview/llfloateremojipicker.cpp | 5 +---- indra/newview/llfloaterimsessiontab.cpp | 1 + .../default/textures/icons/emoji_picker_icon.png | Bin 316 -> 0 bytes indra/newview/skins/default/textures/textures.xml | 1 - .../skins/default/xui/en/floater_im_session.xml | 11 ++++++----- 6 files changed, 9 insertions(+), 10 deletions(-) delete mode 100644 indra/newview/skins/default/textures/icons/emoji_picker_icon.png diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index 07e02de6d8..b1089a3903 100644 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -61,6 +61,7 @@ public: LLUIString() : mArgs(NULL), mNeedsResult(false), mNeedsWResult(false) {} LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args); LLUIString(const std::string& instring) : mArgs(NULL) { assign(instring); } + LLUIString(const LLWString& instring) : mArgs(NULL) { insert(0, instring); } ~LLUIString() { delete mArgs; } void assign(const std::string& instring); diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index 808aca4bf4..c3344fc18a 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -355,10 +355,7 @@ void LLFloaterEmojiPicker::fillGroups() button->setMouseLeaveCallback([this](LLUICtrl* ctrl, const LLSD&) { onGroupButtonMouseLeave(ctrl); }); button->setRect(rect); - - LLUIString text; - text.insert(0, LLWString(1, group.Character)); - button->setLabel(text); + button->setLabel(LLUIString(LLWString(1, group.Character))); if (mGroupButtons.size() == sSelectedGroupIndex) { diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 8ab41b227b..bacfd8ca33 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -254,6 +254,7 @@ BOOL LLFloaterIMSessionTab::postBuild() mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this)); mEmojiBtn = getChild("emoji_panel_btn"); + mEmojiBtn->setLabel(LLUIString(LLWString(1, 128512))); mEmojiBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onEmojiPanelBtnClicked, this)); mGearBtn = getChild("gear_btn"); diff --git a/indra/newview/skins/default/textures/icons/emoji_picker_icon.png b/indra/newview/skins/default/textures/icons/emoji_picker_icon.png deleted file mode 100644 index 668dcaf193d625328a7df58325ad6a4b69b872b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkQ1G3n zi(^Q|oV}O!dbt=1us%4Qs-3IHack#MyS5D-5fMMs#BOVLEI3-0m72JCy}}FT9n->; zl9F>5UhA^Is@^D=H}UH-0p|9UXHVvwR9U%dzg)xtiSi2mJ4yV-v5!ReJmB#56p(l% z;U6(iP40muXT7FD4^y*DWz*RvvF!!3l;tk!8$|e27avhiGw2Gt6vKXNXJpM29=Q!| z#%qrKDeioG$Ld`%n{tfU7K4LseJeg*t;^0yUM_0BarwMwcE_aol=dC-UBlme`@L1t zWIfKkVe7>0H@(c-$aPS(%uwFrenpT9U$dRw2Pq5x_whL&)<2fk5p@@uEL9r_^f`m4 LtDnm{r-UW|`?`69 diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index d8c873e791..8fa257131e 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -206,7 +206,6 @@ with the same filename but different name - diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 1592352d1b..fc54710941 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -300,16 +300,17 @@ right="-30" wrap="true" />