From 24eda00b2eee2b63acb9f420750028643fe50e19 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 25 Feb 2015 10:48:05 +0100 Subject: [PATCH] Merge fix #2: Fix optional icon positioning in LLTextBase Icon needs to be prepending the text if we either want it to be on the left or the URL itself is trusted. On the other hand, only append the icon if we either want it to be on the right side of the URL (restoring behavior prior V3.7.25) AND if the URL itself is not trusted (we would create a duplicate trusted icon otherwise). --- indra/llui/lltextbase.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index c31a93cdad..810f516446 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2263,14 +2263,17 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para appendAndHighlightText(subtext, part, style_params); } + // add icon before url if need // Optional icon position - if (mIconPositioning == LLTextBaseEnums::LEFT) + //LLTextUtil::processUrlMatch(&match,this,isContentTrusted() || match.isTrusted()); + if (mIconPositioning == LLTextBaseEnums::LEFT || match.isTrusted()) { LLTextUtil::processUrlMatch(&match,this,isContentTrusted() || match.isTrusted()); } // Optional icon position // output the styled Url + //appendAndHighlightTextImpl(label, part, link_params, match.underlineOnHoverOnly()); // FIRE-11437 - Don't supress font style for chat history name links //appendAndHighlightTextImpl(match.getLabel(), part, link_params, match.underlineOnHoverOnly()); appendAndHighlightTextImpl(match.getLabel(), part, link_params, @@ -2289,8 +2292,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para } // Optional icon position - //LLTextUtil::processUrlMatch(&match,this,isContentTrusted()); - if (mIconPositioning == LLTextBaseEnums::RIGHT) + if (mIconPositioning == LLTextBaseEnums::RIGHT && !match.isTrusted()) { LLTextUtil::processUrlMatch(&match,this,isContentTrusted()); }