From 27dd9ee482f7f69651d44f8c7114a22ff761c013 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 28 Feb 2024 23:19:46 +0100 Subject: triage#86 Use Emoji font in LineEditor by default --- indra/newview/llfloateremojipicker.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloateremojipicker.cpp') diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index 1578caa39c..79d118bc8a 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -138,7 +138,7 @@ public: F32 x = getRect().getWidth() / 2; F32 y = getRect().getHeight() / 2; - LLFontGL::getFontEmoji()->render( + LLFontGL::getFontEmojiLarge()->render( mText, // wstr 0, // begin_offset x, // x @@ -229,7 +229,7 @@ protected: { F32 x0 = x; F32 x1 = max_pixels; - LLFontGL* font = LLFontGL::getFontEmoji(); + LLFontGL* font = LLFontGL::getFontEmojiLarge(); if (mBegin) { std::string text = mTitle.substr(0, mBegin); @@ -423,7 +423,7 @@ void LLFloaterEmojiPicker::fillGroups() mGroupButtons.clear(); LLButton::Params params; - params.font = LLFontGL::getFontEmoji(); + params.font = LLFontGL::getFontEmojiLarge(); LLRect rect; rect.mTop = mGroups->getRect().getHeight(); -- cgit v1.2.3 From 1781e2d17b777e32e9b51e5a901c1295db80a4d8 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 8 Mar 2024 13:25:43 +0100 Subject: viewer#944 Make 'Debug Unicode' feature available for all LLViews --- indra/newview/llfloateremojipicker.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llfloateremojipicker.cpp') diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index 79d118bc8a..d08c27bcfc 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -128,7 +128,7 @@ public: , const LLEmojiSearchResult& emoji) : LLScrollingPanel(panel_params) , mData(emoji) - , mText(LLWString(1, emoji.Character)) + , mChar(LLWString(1, emoji.Character)) { } @@ -139,7 +139,7 @@ public: F32 x = getRect().getWidth() / 2; F32 y = getRect().getHeight() / 2; LLFontGL::getFontEmojiLarge()->render( - mText, // wstr + mChar, // wstr 0, // begin_offset x, // x y, // y @@ -154,11 +154,11 @@ public: virtual void updatePanel(BOOL allow_modify) override {} const LLEmojiSearchResult& getData() const { return mData; } - LLWString getText() const { return mText; } + const LLWString& getChar() const { return mChar; } private: const LLEmojiSearchResult mData; - const LLWString mText; + const LLWString mChar; }; class LLEmojiPreviewPanel : public LLPanel @@ -924,7 +924,7 @@ void LLFloaterEmojiPicker::onEmojiMouseUp(LLUICtrl* ctrl) if (LLEmojiGridIcon* icon = dynamic_cast(ctrl)) { - LLSD value(wstring_to_utf8str(icon->getText())); + LLSD value(wstring_to_utf8str(icon->getChar())); setValue(value); onCommit(); -- cgit v1.2.3 From 6e9cccedb504bfa325b0fa30088d69db1ee80dc8 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 22 Mar 2024 20:50:33 +0100 Subject: triage#112 'No emoji found for' text is not translated to other languages in the 'Choose Emoji' floater --- indra/newview/llfloateremojipicker.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloateremojipicker.cpp') diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index d08c27bcfc..1fc5740532 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -40,6 +40,7 @@ #include "llscrolllistitem.h" #include "llsdserialize.h" #include "lltextbox.h" +#include "lltrans.h" #include "llviewerchat.h" namespace { @@ -388,9 +389,12 @@ void LLFloaterEmojiPicker::initialize() } else { - const std::string prompt("No emoji found for "); - std::string title(prompt + '"' + mFilterPattern.substr(1) + '"'); - mPreview->setData(EMPTY_LIST_IMAGE_INDEX, title, prompt.size() + 1, title.size() - 1); + std::size_t begin, end; + LLStringUtil::format_map_t args; + args["[FILTER]"] = mFilterPattern.substr(1); + std::string title(getString("text_no_emoji_for_filter", args)); + LLEmojiDictionary::searchInShortCode(begin, end, title, mFilterPattern); + mPreview->setData(EMPTY_LIST_IMAGE_INDEX, title, begin, end); showPreview(true); } return; -- cgit v1.2.3 From 1ad53b9707438e1676446b26e06bca77cff2e5ad Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 2 Apr 2024 04:23:54 +0200 Subject: secondlife/viewer#925 Missing simple :smile emoji --- indra/newview/llfloateremojipicker.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'indra/newview/llfloateremojipicker.cpp') diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index 1fc5740532..51b31a72ca 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -489,10 +489,12 @@ void LLFloaterEmojiPicker::fillCategoryRecentlyUsed(std::mapsecond->ShortCodes.empty()) { - const std::string shortcode(e2d->second->ShortCodes.front()); - if (LLEmojiDictionary::searchInShortCode(begin, end, shortcode, mFilterPattern)) + for (const std::string& shortcode : e2d->second->ShortCodes) { - emojis.emplace_back(emoji, shortcode, begin, end); + if (LLEmojiDictionary::searchInShortCode(begin, end, shortcode, mFilterPattern)) + { + emojis.emplace_back(emoji, shortcode, begin, end); + } } } } @@ -521,10 +523,12 @@ void LLFloaterEmojiPicker::fillCategoryFrequentlyUsed(std::mapsecond->ShortCodes.empty()) { - const std::string shortcode(e2d->second->ShortCodes.front()); - if (LLEmojiDictionary::searchInShortCode(begin, end, shortcode, mFilterPattern)) + for (const std::string& shortcode : e2d->second->ShortCodes) { - emojis.emplace_back(emoji.first, shortcode, begin, end); + if (LLEmojiDictionary::searchInShortCode(begin, end, shortcode, mFilterPattern)) + { + emojis.emplace_back(emoji.first, shortcode, begin, end); + } } } } @@ -557,10 +561,12 @@ void LLFloaterEmojiPicker::fillGroupEmojis(std::mapShortCodes.empty()) { - const std::string shortcode(descr->ShortCodes.front()); - if (LLEmojiDictionary::searchInShortCode(begin, end, shortcode, mFilterPattern)) + for (const std::string& shortcode : descr->ShortCodes) { - emojis.emplace_back(descr->Character, shortcode, begin, end); + if (LLEmojiDictionary::searchInShortCode(begin, end, shortcode, mFilterPattern)) + { + emojis.emplace_back(descr->Character, shortcode, begin, end); + } } } } -- cgit v1.2.3 From 4016a086075ac1ba3a1bff8bc06468de654dad67 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 18 Apr 2024 23:48:44 +0200 Subject: secondlife/viewer#1249 Erratic Emoji Picker Behavior --- indra/newview/llfloateremojipicker.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llfloateremojipicker.cpp') diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index 51b31a72ca..78b94d1b0c 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -333,6 +333,14 @@ void LLFloaterEmojiPicker::onOpen(const LLSD& key) gFloaterView->adjustToFitScreen(this, FALSE); } +void LLFloaterEmojiPicker::onClose(bool app_quitting) +{ + if (!app_quitting) + { + LLEmojiHelper::instance().hideHelper(nullptr, true); + } +} + void LLFloaterEmojiPicker::dirtyRect() { super::dirtyRect(); -- cgit v1.2.3