From 409b9eebe12b864280ead8e3c537a73e40548b97 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Sun, 4 Aug 2024 20:02:53 -0400 Subject: Fix chat text segments not dynamically updating when colors changed in preferences --- indra/newview/llviewerchat.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerchat.cpp') diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp index 597cf3c98c..8b01c4ef88 100644 --- a/indra/newview/llviewerchat.cpp +++ b/indra/newview/llviewerchat.cpp @@ -41,7 +41,7 @@ LLViewerChat::font_change_signal_t LLViewerChat::sChatFontChangedSignal; //static -void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color) +void LLViewerChat::getChatColor(const LLChat& chat, LLUIColor& r_color, F32& r_color_alpha) { if(chat.mMuted) { @@ -90,7 +90,7 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color) } break; default: - r_color.setToWhite(); + r_color = LLUIColorTable::instance().getColor("White"); } if (!chat.mPosAgent.isExactlyZero()) @@ -101,7 +101,11 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color) if (distance_squared > dist_near_chat * dist_near_chat) { // diminish far-off chat - r_color.mV[VALPHA] = 0.8f; + r_color_alpha = 0.8f; + } + else + { + r_color_alpha = 1.0f; } } } -- cgit v1.2.3