From 11fc2da6fa5fba0bb659dd97f8533e4529aece06 Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 12 Nov 2009 21:20:18 +0800 Subject: make color and font affecting both nearby chat and toasts --- indra/newview/llchathistory.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 2ccd6b7d35..cc014e3c28 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -330,7 +330,7 @@ LLView* LLChatHistory::getHeader(const LLChat& chat) return header; } -void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& style_params) +void LLChatHistory::appendWidgetMessage(const LLChat& chat) { LLView* view = NULL; std::string view_text; @@ -370,7 +370,17 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty appendWidget(p, view_text, false); //Append the text message + + LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); + LLViewerChat::getChatColor(chat,txt_color); + LLFontGL* fontp = LLViewerChat::getChatFont(); + std::string message = chat.mText + '\n'; + + LLStyle::Params style_params; + style_params.color(txt_color); + style_params.font(fontp); + appendText(message, FALSE, style_params); mLastFromName = chat.mFromName; -- cgit v1.2.3 From b4a3b65a602ad56baf761a8426093eda585bc572 Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 12 Nov 2009 23:02:41 +0800 Subject: fix merge error --- indra/newview/llchathistory.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 6d8d11ad2b..2b050f3eb5 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -338,11 +338,22 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) LLView* view = NULL; std::string view_text = "\n[" + formatCurrentTime() + "] " + chat.mFromName + ": "; + LLInlineViewSegment::Params p; p.force_newline = true; p.left_pad = mLeftWidgetPad; p.right_pad = mRightWidgetPad; + + LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); + LLViewerChat::getChatColor(chat,txt_color); + LLFontGL* fontp = LLViewerChat::getChatFont(); + + LLStyle::Params style_params; + style_params.color(txt_color); + style_params.font(fontp); + + if (mLastFromName == chat.mFromName) { view = getSeparator(); @@ -357,6 +368,7 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) else p.top_pad = mTopHeaderPad; p.bottom_pad = mBottomHeaderPad; + } p.view = view; @@ -371,18 +383,8 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) appendWidget(p, view_text, false); //Append the text message - - LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); - LLViewerChat::getChatColor(chat,txt_color); - LLFontGL* fontp = LLViewerChat::getChatFont(); - - std::string message = chat.mText + '\n'; - - LLStyle::Params style_params; - style_params.color(txt_color); - style_params.font(fontp); - appendText(message, FALSE, style_params); + appendText(chat.mText, FALSE, style_params); mLastFromName = chat.mFromName; blockUndo(); -- cgit v1.2.3 From 01f1eaf7e0faaa3ecde36ac28a346fed53a571fd Mon Sep 17 00:00:00 2001 From: angela Date: Fri, 13 Nov 2009 15:19:37 +0800 Subject: fix style readonlycolor overwriting color --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 2b050f3eb5..69e1f8d428 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -351,6 +351,7 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) LLStyle::Params style_params; style_params.color(txt_color); + style_params.readonly_color(txt_color); style_params.font(fontp); @@ -383,7 +384,6 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) appendWidget(p, view_text, false); //Append the text message - appendText(chat.mText, FALSE, style_params); mLastFromName = chat.mFromName; -- cgit v1.2.3