diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index 0767989983..5b698d27bf 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -975,7 +975,7 @@ BOOL FSFloaterIM::postBuild() mEmojiPickerToggleBtn->setLabel(LLUIString(LLWString(1, 128512))); mEmojiPickerToggleBtn->setClickedCallback([this](LLUICtrl*, const LLSD&) { onEmojiPickerToggleBtnClicked(this); }); - mRecentEmojisUpdatedCallbackConnection = LLFloaterEmojiPicker::setRecentEmojisUpdatedCallback([this](const std::list& recent_emojis_list) { onEmojiRecentPanelOpening(); }); + mRecentEmojisUpdatedCallbackConnection = LLFloaterEmojiPicker::setRecentEmojisUpdatedCallback([this](const std::list& recent_emojis_list) { initEmojiRecentPanel(false); }); getChild("send_chat")->setCommitCallback(boost::bind(&FSFloaterIM::sendMsgFromInputEditor, this, CHAT_TYPE_NORMAL)); getChild("chat_search_btn")->setCommitCallback(boost::bind(&FSFloaterIM::onChatSearchButtonClicked, this)); @@ -2476,13 +2476,13 @@ void FSFloaterIM::onEmojiRecentPanelToggleBtnClicked(FSFloaterIM* self) BOOL show = !self->mEmojiRecentPanel->getVisible(); if (show) { - self->onEmojiRecentPanelOpening(); + self->initEmojiRecentPanel(true); } self->mEmojiRecentPanel->setVisible(show); self->mEmojiRecentPanelToggleBtn->setImageOverlay(show ? "Arrow_Up" : "Arrow_Down"); } -void FSFloaterIM::onEmojiRecentPanelOpening() +void FSFloaterIM::initEmojiRecentPanel(bool moveFocus) { std::list& recentlyUsed = LLFloaterEmojiPicker::getRecentlyUsed(); if (recentlyUsed.empty()) @@ -2500,7 +2500,10 @@ void FSFloaterIM::onEmojiRecentPanelOpening() mEmojiRecentIconsCtrl->setEmojis(emojis); mEmojiRecentEmptyText->setVisible(false); mEmojiRecentIconsCtrl->setVisible(true); - mEmojiRecentIconsCtrl->setFocus(true); + if (moveFocus) + { + mEmojiRecentIconsCtrl->setFocus(true); + } } } diff --git a/indra/newview/fsfloaterim.h b/indra/newview/fsfloaterim.h index 3f98d5748a..d60d7c2c2e 100644 --- a/indra/newview/fsfloaterim.h +++ b/indra/newview/fsfloaterim.h @@ -242,7 +242,7 @@ private: bool onChatOptionsEnableContextMenuItem(const LLSD& userdata); static void onEmojiRecentPanelToggleBtnClicked(FSFloaterIM* self); - void onEmojiRecentPanelOpening(); + void initEmojiRecentPanel(bool moveFocus); void onRecentEmojiPicked(const LLSD& value); void onEmojiPicked(llwchar emoji); void onEmojiPickerClosed(); diff --git a/indra/newview/fsfloaternearbychat.cpp b/indra/newview/fsfloaternearbychat.cpp index 5d91313a15..0ae2610a6c 100644 --- a/indra/newview/fsfloaternearbychat.cpp +++ b/indra/newview/fsfloaternearbychat.cpp @@ -164,7 +164,7 @@ BOOL FSFloaterNearbyChat::postBuild() mEmojiPickerToggleBtn->setLabel(LLUIString(LLWString(1, 128512))); mEmojiPickerToggleBtn->setClickedCallback([this](LLUICtrl*, const LLSD&) { onEmojiPickerToggleBtnClicked(this); }); - mRecentEmojisUpdatedCallbackConnection = LLFloaterEmojiPicker::setRecentEmojisUpdatedCallback([this](const std::list& recent_emojis_list) { onEmojiRecentPanelOpening(); }); + mRecentEmojisUpdatedCallbackConnection = LLFloaterEmojiPicker::setRecentEmojisUpdatedCallback([this](const std::list& recent_emojis_list) { initEmojiRecentPanel(false); }); getChild("chat_history_btn")->setCommitCallback(boost::bind(&FSFloaterNearbyChat::onHistoryButtonClicked, this)); getChild("chat_search_btn")->setCommitCallback(boost::bind(&FSFloaterNearbyChat::onSearchButtonClicked, this)); @@ -974,13 +974,13 @@ void FSFloaterNearbyChat::onEmojiRecentPanelToggleBtnClicked(FSFloaterNearbyChat BOOL show = !self->mEmojiRecentPanel->getVisible(); if (show) { - self->onEmojiRecentPanelOpening(); + self->initEmojiRecentPanel(true); } self->mEmojiRecentPanel->setVisible(show); self->mEmojiRecentPanelToggleBtn->setImageOverlay(show ? "Arrow_Up" : "Arrow_Down"); } -void FSFloaterNearbyChat::onEmojiRecentPanelOpening() +void FSFloaterNearbyChat::initEmojiRecentPanel(bool moveFocus) { std::list& recentlyUsed = LLFloaterEmojiPicker::getRecentlyUsed(); if (recentlyUsed.empty()) @@ -998,7 +998,10 @@ void FSFloaterNearbyChat::onEmojiRecentPanelOpening() mEmojiRecentIconsCtrl->setEmojis(emojis); mEmojiRecentEmptyText->setVisible(false); mEmojiRecentIconsCtrl->setVisible(true); - mEmojiRecentIconsCtrl->setFocus(true); + if (moveFocus) + { + mEmojiRecentIconsCtrl->setFocus(true); + } } } diff --git a/indra/newview/fsfloaternearbychat.h b/indra/newview/fsfloaternearbychat.h index cee548fbdd..f1b952906e 100644 --- a/indra/newview/fsfloaternearbychat.h +++ b/indra/newview/fsfloaternearbychat.h @@ -124,7 +124,7 @@ private: bool onChatOptionsEnableContextMenuItem(const LLSD& userdata); static void onEmojiRecentPanelToggleBtnClicked(FSFloaterNearbyChat* self); - void onEmojiRecentPanelOpening(); + void initEmojiRecentPanel(bool moveFocus); void onRecentEmojiPicked(const LLSD& value); void onEmojiPicked(llwchar emoji); void onEmojiPickerClosed(); diff --git a/indra/newview/skins/default/xui/en/floater_fs_im_session.xml b/indra/newview/skins/default/xui/en/floater_fs_im_session.xml index 85fd6e9dff..40e206b8b8 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_im_session.xml @@ -727,7 +727,6 @@ name="emoji_recent_icons_ctrl" follows="top|left|right" layout="topleft" - noscroll="true" max_emoji="20" top="0" left="5" diff --git a/indra/newview/skins/default/xui/en/floater_fs_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_fs_nearby_chat.xml index ae4a65cd72..41e61508ee 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_nearby_chat.xml @@ -418,7 +418,6 @@ name="emoji_recent_icons_ctrl" follows="top|left|right" layout="topleft" - noscroll="true" max_emoji="20" top="0" left="5"