From 18039655ed91e87db1aca9f4d782e65725e30f12 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 5 Jul 2023 17:44:27 +0200 Subject: SL-19951 Make EmojiFloater UI design looking similar to Slack - bg colors --- indra/newview/llfloateremojipicker.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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& 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); -- cgit v1.2.3