diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-08-29 13:12:09 +0200 |
---|---|---|
committer | Guru <alexandrgproductengine@lindenlab.com> | 2023-08-29 13:58:47 +0200 |
commit | 031032fb892560a0f5fa1a996aea77f593f54704 (patch) | |
tree | 4357d4f730a3adec8ac5a748ab7f773a53149fd3 /indra | |
parent | 0cc9a2d8fd54ea5ed906597f2f922a85265bdd03 (diff) |
SL-20211 EmojiPicker - The search field should be the same as other floaters
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llsearcheditor.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llfloateremojipicker.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llfloateremojipicker.h | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_emoji_picker.xml | 9 |
4 files changed, 13 insertions, 14 deletions
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index bafeef41fb..cfaf08ec0a 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -178,6 +178,10 @@ void LLSearchEditor::setFocus( BOOL b ) void LLSearchEditor::onClearButtonClick(const LLSD& data) { setText(LLStringUtil::null); + if (mTextChangedCallback) + { + mTextChangedCallback(this, getValue()); + } mSearchEditor->onCommit(); // force keystroke callback } diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index c3344fc18a..af807ba7cf 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -31,9 +31,9 @@ #include "llbutton.h" #include "llcombobox.h" #include "llemojidictionary.h" +#include "llfiltereditor.h" #include "llfloaterreg.h" #include "llkeyboard.h" -#include "lllineeditor.h" #include "llscrollcontainer.h" #include "llscrollingpanellist.h" #include "llscrolllistctrl.h" @@ -294,9 +294,9 @@ BOOL LLFloaterEmojiPicker::postBuild() mGroups = getChild<LLPanel>("Groups"); mBadge = getChild<LLPanel>("Badge"); - mFilter = getChild<LLLineEditor>("Filter"); - mFilter->setKeystrokeCallback([this](LLLineEditor*, void*) { onSearchKeystroke(); }, NULL); - mFilter->setFont(LLViewerChat::getChatFont()); + mFilter = getChild<LLFilterEditor>("Filter"); + mFilter->setKeystrokeCallback([this](LLUICtrl*, const LLSD&) { onFilterChanged(); }); + mFilter->setTextChangedCallback([this](LLUICtrl*, const LLSD&) { onFilterChanged(); }); mFilter->setText(sFilterPattern); mEmojiScroll = getChild<LLScrollContainer>("EmojiGridContainer"); @@ -588,7 +588,7 @@ void LLFloaterEmojiPicker::onGroupButtonClick(LLUICtrl* ctrl) } } -void LLFloaterEmojiPicker::onSearchKeystroke() +void LLFloaterEmojiPicker::onFilterChanged() { sFilterPattern = mFilter->getText(); fillEmojis(); diff --git a/indra/newview/llfloateremojipicker.h b/indra/newview/llfloateremojipicker.h index e4b1216ce6..3cae818e15 100644 --- a/indra/newview/llfloateremojipicker.h +++ b/indra/newview/llfloateremojipicker.h @@ -60,7 +60,7 @@ private: void fillEmojis(bool fromResize = false); void onGroupButtonClick(LLUICtrl* ctrl); - void onSearchKeystroke(); + void onFilterChanged(); void onGridMouseEnter(); void onGridMouseLeave(); void onGroupButtonMouseEnter(LLUICtrl* ctrl); @@ -81,7 +81,7 @@ private: class LLPanel* mGroups { nullptr }; class LLPanel* mBadge { nullptr }; - class LLLineEditor* mFilter { nullptr }; + class LLFilterEditor* mFilter { nullptr }; class LLScrollContainer* mEmojiScroll { nullptr }; class LLScrollingPanelList* mEmojiGrid { nullptr }; class LLEmojiPreviewPanel* mPreview { nullptr }; 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 a2a290c306..6c440de573 100644 --- a/indra/newview/skins/default/xui/en/floater_emoji_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_emoji_picker.xml @@ -12,19 +12,14 @@ width="250"> <floater.string name="title_for_recently_used" value="Recently used"/> <floater.string name="title_for_frequently_used" value="Frequently used"/> - <line_editor + <filter_editor name="Filter" label="Start typing to filter" layout="bottomleft" follows="bottom|left|right" - text_tentative_color="TextFgTentativeColor" - show_label_focused="true" - max_length_bytes="63" - text_pad_right="5" - text_pad_left="5" bottom="14" left="10" - height="29" + height="23" width="230" /> <scroll_container name="EmojiGridContainer" |