summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-09-16 16:09:25 +0200
committerAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-09-16 16:09:25 +0200
commit771d409b08eb6073f87aee25a95c242d8178d705 (patch)
tree0f40bd9be2b984de821919287a2d7da6815d0d60 /indra/newview
parent0e135d2a2c1119592a2b7ca70acd95711241de16 (diff)
SL-20211 EmojiPicker - Move the filter field to the top of the floater
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloateremojipicker.cpp14
-rw-r--r--indra/newview/llfloateremojipicker.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_emoji_picker.xml21
3 files changed, 25 insertions, 11 deletions
diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index 1169100336..1608a4f19c 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -193,7 +193,7 @@ public:
F32 centerX = 0.5f * iconWidth;
F32 centerY = 0.5f * clientHeight;
- drawIcon(centerX, centerY, iconWidth);
+ drawIcon(centerX, centerY - 1, iconWidth);
static LLColor4 defaultColor(0.75f, 0.75f, 0.75f, 1.0f);
LLColor4 textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", defaultColor);
@@ -291,6 +291,8 @@ BOOL LLFloaterEmojiPicker::postBuild()
mPreview->setVisible(FALSE);
addChild(mPreview);
+ mDummy = getChild<LLTextBox>("Dummy");
+
mGroups = getChild<LLPanel>("Groups");
mBadge = getChild<LLPanel>("Badge");
@@ -318,8 +320,9 @@ void LLFloaterEmojiPicker::dirtyRect()
if (!mFilter)
return;
- const S32 PADDING = 4;
- LLRect rect(PADDING, mFilter->getRect().mTop, getRect().getWidth() - PADDING * 2, PADDING);
+ const S32 HPADDING = 4;
+ const S32 VOFFSET = 12;
+ LLRect rect(HPADDING, mDummy->getRect().mTop + 6, getRect().getWidth() - HPADDING, VOFFSET);
if (mPreview->getRect() != rect)
{
mPreview->setRect(rect);
@@ -596,7 +599,7 @@ void LLFloaterEmojiPicker::onFilterChanged()
void LLFloaterEmojiPicker::onGridMouseEnter()
{
- mFilter->setVisible(FALSE);
+ mDummy->setVisible(FALSE);
mPreview->setEmoji(nullptr);
mPreview->setVisible(TRUE);
}
@@ -604,8 +607,7 @@ void LLFloaterEmojiPicker::onGridMouseEnter()
void LLFloaterEmojiPicker::onGridMouseLeave()
{
mPreview->setVisible(FALSE);
- mFilter->setVisible(TRUE);
- mFilter->setFocus(TRUE);
+ mDummy->setVisible(TRUE);
}
void LLFloaterEmojiPicker::onGroupButtonMouseEnter(LLUICtrl* ctrl)
diff --git a/indra/newview/llfloateremojipicker.h b/indra/newview/llfloateremojipicker.h
index decee41721..cfb3da3acc 100644
--- a/indra/newview/llfloateremojipicker.h
+++ b/indra/newview/llfloateremojipicker.h
@@ -86,6 +86,7 @@ private:
class LLScrollContainer* mEmojiScroll { nullptr };
class LLScrollingPanelList* mEmojiGrid { nullptr };
class LLEmojiPreviewPanel* mPreview { nullptr };
+ class LLTextBox* mDummy { nullptr };
pick_callback_t mEmojiPickCallback;
close_callback_t mFloaterCloseCallback;
diff --git a/indra/newview/skins/default/xui/en/floater_emoji_picker.xml b/indra/newview/skins/default/xui/en/floater_emoji_picker.xml
index 6c440de573..d6774be65c 100644
--- a/indra/newview/skins/default/xui/en/floater_emoji_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_emoji_picker.xml
@@ -15,9 +15,9 @@
<filter_editor
name="Filter"
label="Start typing to filter"
- layout="bottomleft"
- follows="bottom|left|right"
- bottom="14"
+ layout="topleft"
+ follows="top|left|right"
+ top="27"
left="10"
height="23"
width="230" />
@@ -25,9 +25,9 @@
name="EmojiGridContainer"
layout="topleft"
follows="all"
- top="25"
+ top="50"
left="0"
- height="325"
+ height="300"
width="250">
<scrolling_panel_list
name="EmojiGrid"
@@ -59,4 +59,15 @@
width="20"
/>
</panel>
+ <text
+ name="Dummy"
+ type="string"
+ layout="bottomleft"
+ follows="bottom|left|right"
+ halign="center"
+ valign="center"
+ bottom="14"
+ left="10"
+ height="23"
+ width="230">No emoji selected</text>
</floater>