diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp index cf6d8fe539..8c4d3a5c6b 100644 --- a/indra/llui/llstyle.cpp +++ b/indra/llui/llstyle.cpp @@ -42,7 +42,10 @@ LLStyle::Params::Params() image("image"), link_href("href"), is_link("is_link"), - use_default_link_style("use_default_link_style", true) // Don't highlight URLs on hover if font style contains underline + // Don't highlight URLs on hover if font style contains underline + use_default_link_style("use_default_link_style", true), + is_chat_header("is_chat_header", false) + // {} diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h index dbdaa59d0f..2fe9117509 100644 --- a/indra/llui/llstyle.h +++ b/indra/llui/llstyle.h @@ -48,7 +48,10 @@ public: Optional image; Optional link_href; Optional is_link; - Optional use_default_link_style; // Don't highlight URLs on hover if font style contains underline + // Don't highlight URLs on hover if font style contains underline + Optional use_default_link_style; + Optional is_chat_header; + // Params(); }; LLStyle(const Params& p = Params()); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index a255dba8b4..d0f4f69023 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2257,8 +2257,20 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para LLStyle::Params link_params(style_params); // Overwrite only if we explicitly allow it + //link_params.overwriteFrom(match.getStyle()); if (input_params.use_default_link_style) + { + LLUIColor color(link_params.color()); + LLUIColor readonly_color(link_params.readonly_color()); + bool is_chat_header = link_params.is_chat_header(); link_params.overwriteFrom(match.getStyle()); + if (is_chat_header) + { + link_params.color = color; + link_params.readonly_color = readonly_color; + } + } + // // output the text before the Url if (start > 0) diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index 4f91d315f9..f272320aa9 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -1258,6 +1258,7 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL LLStyle::Params name_params(body_message_params); name_params.color(name_color); name_params.readonly_color(name_color); + name_params.is_chat_header(true); // FS:LO FIRE-2899 - Faded text for IMs in nearby chat F32 FSIMChatHistoryFade = gSavedSettings.getF32("FSIMChatHistoryFade");