summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastnotifypanel.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-08-17 20:30:20 -0400
committerGitHub <noreply@github.com>2026-08-17 20:30:20 -0400
commit18648fc51e2a0c750182d8aa3814ed5b6bf8445e (patch)
tree0517959512fc0d6876780641da88b74dd72aec5b /indra/newview/lltoastnotifypanel.cpp
parent6d4c4c029ce43aa413266135829cd2bc00001890 (diff)
parent932e8ac318eb2e29ea519249348315b50c7d1d58 (diff)
Merge pull request #5638 from secondlife/release/26.3
Release/26.3
Diffstat (limited to 'indra/newview/lltoastnotifypanel.cpp')
-rw-r--r--indra/newview/lltoastnotifypanel.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 0c4a9c81c2..e905a879cb 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -38,6 +38,7 @@
#include "llnotifications.h"
#include "lluiconstants.h"
#include "llrect.h"
+#include "llstring.h"
#include "lltrans.h"
#include "llnotificationsutil.h"
#include "llviewermessage.h"
@@ -91,8 +92,24 @@ LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, bool is_opt
std::string name = form_element["name"].asString();
std::string text = form_element["text"].asString();
bool make_small_btn = index == -1 || index == -2; // for block and ignore buttons in script dialog
+
+ // Use Emoji font as exception if text contains red heart emoji (10084 U+2764) to ensure proper rendering
+ std::string font_name = mIsScriptDialog ? sFontScript : sFontDefault;
+ if (mIsScriptDialog)
+ {
+ LLWString wtext = utf8str_to_wstring(text);
+ for (llwchar ch : wtext)
+ {
+ if (ch == 0x2764)
+ {
+ font_name = "Emoji";
+ break;
+ }
+ }
+ }
+
const LLFontGL* font = LLFontGL::getFont(LLFontDescriptor(
- mIsScriptDialog ? sFontScript : sFontDefault, make_small_btn ? "Small" : "Medium", 0));
+ font_name, make_small_btn ? "Small" : "Medium", 0));
p.name = name;
p.label = text;
p.tool_tip = text;
@@ -284,7 +301,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
mIsScriptDialog = (notif_name == "ScriptDialog" || notif_name == "ScriptDialogGroup");
static LLCachedControl<S32> btn_width(gSavedSettings, "ToastButtonWidth", 90);
- static LLCachedControl<S32> script_button_width(gSavedSettings, "ScriptToastButtonWidth", 110);
+ static LLCachedControl<S32> script_button_width(gSavedSettings, "ScriptToastButtonWidth", 127);
mButtonWidth = mIsScriptDialog ? script_button_width : btn_width;
bool is_content_trusted = (notif_name != "LoadWebPage");