diff options
author | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-06-08 19:51:56 +0300 |
---|---|---|
committer | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-06-08 19:51:56 +0300 |
commit | 33adfe09474c58075d58feff1fc34e24503d3e80 (patch) | |
tree | 911d03ee2439e40b3e5f51a84d1c0eaefd5d76f5 /indra | |
parent | 164e1073952060cf88a163945d6745934db62620 (diff) |
CHUI-103 FIXED Added a square brackets to system messages; changed a default color for user messages
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llchathistory.cpp | 19 |
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); |