summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloater.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2009-11-17 16:33:49 +0800
committerangela <angela@lindenlab.com>2009-11-17 16:33:49 +0800
commit0098bf40ea73078e2164ae55a8fa2f9049d0d4e9 (patch)
tree32cac232a7bacf814be61026598605d7a683c629 /indra/newview/llimfloater.cpp
parent28aa749db58b3a4095ca7e59811900767cd897b0 (diff)
undo the changes for LLStyle params; add sizeFromFont in LLFontGL ; use font.style, font.name and font.size params for font creating
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r--indra/newview/llimfloater.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index dff27ee032..2c6543d6ca 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -476,27 +476,32 @@ void LLIMFloater::updateMessages()
chat.mFromID = from_id;
chat.mFromName = from;
chat.mText = message;
-
- LLStyle::Params append_style_params;
+
//Handle IRC styled /me messages.
std::string prefix = message.substr(0, 4);
if (prefix == "/me " || prefix == "/me'")
{
- if (from.size() > 0)
- {
- append_style_params.italic= true;
- chat.mText = from + " ";
- mChatHistory->appendWidgetMessage(chat, append_style_params);
- }
- message = message.substr(3);
LLColor4 txt_color = LLUIColorTable::instance().getColor("White");
LLViewerChat::getChatColor(chat,txt_color);
LLFontGL* fontp = LLViewerChat::getChatFont();
+ std::string font_name = LLFontGL::nameFromFont(fontp);
+ std::string font_size = LLFontGL::sizeFromFont(fontp);
+ LLStyle::Params append_style_params;
append_style_params.color(txt_color);
append_style_params.readonly_color(txt_color);
- append_style_params.font(fontp);
- append_style_params.underline = true;
+ append_style_params.font.name(font_name);
+ append_style_params.font.size(font_size);
+
+ if (from.size() > 0)
+ {
+ append_style_params.font.style = "ITALIC";
+ chat.mText = from + " ";
+ mChatHistory->appendWidgetMessage(chat, append_style_params);
+ }
+
+ message = message.substr(3);
+ append_style_params.font.style = "UNDERLINE";
mChatHistory->appendText(message, FALSE, append_style_params);
}
else