summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llsearcheditor.cpp4
-rw-r--r--indra/newview/llfloateremojipicker.cpp10
-rw-r--r--indra/newview/llfloateremojipicker.h4
-rw-r--r--indra/newview/skins/default/xui/en/floater_emoji_picker.xml9
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"