From 66d1b0f0efbd42278aec5cec45b38bcbe937be1e Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 6 Mar 2024 21:43:40 +0100 Subject: triage#103 The focused state of the 'Recently used emojis' is not visible --- indra/newview/llfloaterimsessiontab.cpp | 22 ++++++++++++++++--- indra/newview/llfloaterimsessiontab.h | 3 +++ .../skins/default/xui/en/floater_im_session.xml | 25 +++++++++++++++------- 3 files changed, 39 insertions(+), 11 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("emoji_recent_container"); + mEmojiRecentContainer->setVisible(false); + mEmojiRecentIconsCtrl = getChild("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("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(); diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index cc985b2753..58bfa04dba 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -173,6 +173,7 @@ protected: LLLayoutPanel* mInputButtonPanel; LLLayoutPanel* mEmojiRecentPanel; LLTextBox* mEmojiRecentEmptyText; + LLPanel* mEmojiRecentContainer; LLPanelEmojiComplete* mEmojiRecentIconsCtrl; LLParticipantList* getParticipantList(); conversations_widgets_map mConversationsWidgets; @@ -218,6 +219,8 @@ private: void onEmojiRecentPanelToggleBtnClicked(); void onEmojiPickerShowBtnClicked(); void initEmojiRecentPanel(); + void onEmojiRecentPanelFocusReceived(); + void onEmojiRecentPanelFocusLost(); void onRecentEmojiPicked(const LLSD& value); bool checkIfTornOff(); 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 a6493c5e24..8c3b1fc30f 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -335,7 +335,7 @@ Recently used emojis will appear here - + height="34"> + +