summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsessiontab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 24cc398f3b..e174dad77d 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -267,9 +267,13 @@ BOOL LLFloaterIMSessionTab::postBuild()
mEmojiRecentEmptyText->setToolTip(mEmojiRecentEmptyText->getText());
mEmojiRecentEmptyText->setVisible(false);
+ mEmojiRecentContainer = getChild<LLPanel>("emoji_recent_container");
+ mEmojiRecentContainer->setVisible(false);
+
mEmojiRecentIconsCtrl = getChild<LLPanelEmojiComplete>("emoji_recent_icons_ctrl");
+ mEmojiRecentIconsCtrl->setFocusReceivedCallback([this](LLFocusableElement*) { onEmojiRecentPanelFocusReceived(); });
+ mEmojiRecentIconsCtrl->setFocusLostCallback([this](LLFocusableElement*) { onEmojiRecentPanelFocusLost(); });
mEmojiRecentIconsCtrl->setCommitCallback([this](LLUICtrl*, const LLSD& value) { onRecentEmojiPicked(value); });
- mEmojiRecentIconsCtrl->setVisible(false);
mEmojiPickerShowBtn = getChild<LLButton>("emoji_picker_show_btn");
mEmojiPickerShowBtn->setClickedCallback([this](LLUICtrl*, const LLSD&) { onEmojiPickerShowBtnClicked(); });
@@ -475,7 +479,7 @@ void LLFloaterIMSessionTab::initEmojiRecentPanel()
if (recentlyUsed.empty())
{
mEmojiRecentEmptyText->setVisible(TRUE);
- mEmojiRecentIconsCtrl->setVisible(FALSE);
+ mEmojiRecentContainer->setVisible(FALSE);
}
else
{
@@ -486,10 +490,22 @@ void LLFloaterIMSessionTab::initEmojiRecentPanel()
}
mEmojiRecentIconsCtrl->setEmojis(emojis);
mEmojiRecentEmptyText->setVisible(FALSE);
- mEmojiRecentIconsCtrl->setVisible(TRUE);
+ mEmojiRecentContainer->setVisible(TRUE);
}
}
+// static
+void LLFloaterIMSessionTab::onEmojiRecentPanelFocusReceived()
+{
+ mEmojiRecentContainer->addBorder();
+}
+
+// static
+void LLFloaterIMSessionTab::onEmojiRecentPanelFocusLost()
+{
+ mEmojiRecentContainer->removeBorder();
+}
+
void LLFloaterIMSessionTab::onRecentEmojiPicked(const LLSD& value)
{
LLSD::String str = value.asString();