summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2010-12-03 20:45:53 +0200
committerSeth ProductEngine <slitovchuk@productengine.com>2010-12-03 20:45:53 +0200
commit7ed0938226d377e4945e9eea65ef4e4856716fbd (patch)
tree441341bc711f18b0d4a053e32008c33a3a18c208
parent039c0466f9759d7b966d8faf60945b3924d017a8 (diff)
STORM-579 FIXED SLURLs color for residents and objects names in plain text chat match the user setting for "URLs" in the Color tab in Prefs.
Avatar names SLURLs now use the user color setting for "URLs" everywhere across the viewer.
-rw-r--r--indra/llui/llurlentry.cpp4
-rw-r--r--indra/newview/llchathistory.cpp14
2 files changed, 8 insertions, 10 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 6cc72bad82..f25be55665 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -456,8 +456,8 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
LLStyle::Params LLUrlEntryAgent::getStyle() const
{
LLStyle::Params style_params = LLUrlEntryBase::getStyle();
- style_params.color = LLUIColorTable::instance().getColor("AgentLinkColor");
- style_params.readonly_color = LLUIColorTable::instance().getColor("AgentLinkColor");
+ style_params.color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+ style_params.readonly_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
return style_params;
}
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 271ee0c4a4..6e778de2d8 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -789,24 +789,22 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
// set the link for the object name to be the objectim SLapp
// (don't let object names with hyperlinks override our objectim Url)
LLStyle::Params link_params(style_params);
- link_params.color.control = "HTMLLinkColor";
+ LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+ link_params.color = link_color;
+ link_params.readonly_color = link_color;
link_params.is_link = true;
link_params.link_href = url;
+
mEditor->appendText(chat.mFromName + delimiter,
false, link_params);
}
else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log)
{
LLStyle::Params link_params(style_params);
-
- // Setting is_link = true for agent SLURL to avoid applying default style to it.
- // See LLTextBase::appendTextImpl().
- link_params.is_link = true;
- link_params.link_href = LLSLURL("agent", chat.mFromID, "inspect").getSLURLString();
+ link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));
// Add link to avatar's inspector and delimiter to message.
- mEditor->appendText(chat.mFromName, false, link_params);
- mEditor->appendText(delimiter, false, style_params);
+ mEditor->appendText(std::string(link_params.link_href) + delimiter, false, link_params);
}
else
{