summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-07-05 17:44:27 +0200
committerGuru <alexandrgproductengine@lindenlab.com>2023-07-05 18:14:37 +0200
commit18039655ed91e87db1aca9f4d782e65725e30f12 (patch)
tree3a0ab31371409d0f0515f3f99b94c1bf1d749a0f
parent0414fada8163409adf95f9d7c75a7db5f0952103 (diff)
SL-19951 Make EmojiFloater UI design looking similar to Slack - bg colors
-rw-r--r--indra/newview/llfloateremojipicker.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index 67d5d8ea6b..e620d507ec 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -366,6 +366,18 @@ void LLFloaterEmojiPicker::fillEmojiGrid()
LLPanel::Params icon_params;
LLRect icon_rect(0, iconSize, iconSize, 0);
+ static const LLColor4 bgcolors[] =
+ {
+ LLColor4(0.8f, 0.6f, 0.8f, 1.0f),
+ LLColor4(0.8f, 0.8f, 0.4f, 1.0f),
+ LLColor4(0.6f, 0.6f, 0.8f, 1.0f),
+ LLColor4(0.4f, 0.7f, 0.4f, 1.0f),
+ LLColor4(0.5f, 0.7f, 0.9f, 1.0f),
+ LLColor4(0.7f, 0.8f, 0.2f, 1.0f)
+ };
+
+ static constexpr U32 bgcolorCount = sizeof(bgcolors) / sizeof(*bgcolors);
+
auto listCategory = [&](std::string category, const std::vector<const LLEmojiDescriptor*>& emojis, bool showDivider)
{
int iconIndex = 0;
@@ -395,6 +407,8 @@ void LLFloaterEmojiPicker::fillEmojiGrid()
icon->setMouseEnterCallback([this](LLUICtrl* ctrl, const LLSD&) { onEmojiMouseEnter(ctrl); });
icon->setMouseLeaveCallback([this](LLUICtrl* ctrl, const LLSD&) { onEmojiMouseLeave(ctrl); });
icon->setMouseUpCallback([this](LLUICtrl* ctrl, S32, S32, MASK mask) { onEmojiMouseClick(ctrl, mask); });
+ icon->setBackgroundColor(bgcolors[iconIndex % bgcolorCount]);
+ icon->setBackgroundOpaque(1);
icon->setRect(icon_rect);
row->mList->addPanel(icon, true);