summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llchathistory.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index cfc70a1b0e..dcd6d25888 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -737,7 +737,8 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
LLViewerChat::getChatColor(chat,txt_color);
LLFontGL* fontp = LLViewerChat::getChatFont();
std::string font_name = LLFontGL::nameFromFont(fontp);
- std::string font_size = LLFontGL::sizeFromFont(fontp);
+ std::string font_size = LLFontGL::sizeFromFont(fontp);
+
LLStyle::Params style_params;
style_params.color(txt_color);
style_params.readonly_color(txt_color);
@@ -773,8 +774,9 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
// We graying out chat history by graying out messages that contains full date in a time string
if (message_from_log)
{
- style_params.color(LLColor4::grey);
- style_params.readonly_color(LLColor4::grey);
+ txt_color = LLColor4::grey;
+ style_params.color(txt_color);
+ style_params.readonly_color(txt_color);
}
bool prependNewLineState = mEditor->getText().size() != 0;
@@ -786,7 +788,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
LLStyle::Params timestamp_style(style_params);
- // timestams showing
+ // out of the timestamp
if (args["show_time"].asBoolean())
{
if (!message_from_log)
@@ -799,6 +801,13 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
prependNewLineState = false;
}
+ // out the opening square bracket (if need)
+ if (square_brackets)
+ {
+ mEditor->appendText("[", prependNewLineState, style_params);
+ prependNewLineState = false;
+ }
+
// names showing
if (args["show_names_for_p2p_conv"].asBoolean() && utf8str_trim(chat.mFromName).size() != 0)
{
@@ -947,7 +956,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
if (square_brackets)
{
- message = "[" + message + "]";
+ message += "]";
}
mEditor->appendText(message, prependNewLineState, style_params);