summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llchathistory.cpp14
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp14
-rw-r--r--indra/newview/llexpandabletextbox.cpp5
-rw-r--r--indra/newview/llimfloater.cpp27
-rw-r--r--indra/newview/llnearbychat.cpp22
-rw-r--r--indra/newview/lltoastimpanel.cpp10
6 files changed, 57 insertions, 35 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index bec8eb2666..f9c4a23f12 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -361,15 +361,17 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, const LLStyle::Param
LLColor4 txt_color = LLUIColorTable::instance().getColor("White");
LLViewerChat::getChatColor(chat,txt_color);
- LLFontGL* fontp = LLViewerChat::getChatFont();
-
+ LLFontGL* fontp = LLViewerChat::getChatFont();
+ std::string font_name = LLFontGL::nameFromFont(fontp);
+ std::string font_size = LLFontGL::sizeFromFont(fontp);
LLStyle::Params style_params;
style_params.color(txt_color);
style_params.readonly_color(txt_color);
- style_params.font(fontp);
- style_params.italic = input_append_params.italic;
- style_params.underline = input_append_params.underline;
- style_params.bold = input_append_params.bold;
+ style_params.font.name(font_name);
+ style_params.font.size(font_size);
+ style_params.font.style(input_append_params.font.style);
+
+
if (mLastFromName == chat.mFromName)
{
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 1cc6b2beef..b1dee46d2e 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -160,10 +160,14 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
LLStyle::Params style_params;
style_params.color(mTextColor);
- style_params.font(mFont);
-
- std::string str_sender;
+// style_params.font(mFont);
+ std::string font_name = LLFontGL::nameFromFont(mFont);
+ std::string font_style_size = LLFontGL::sizeFromFont(mFont);
+ style_params.font.name(font_name);
+ style_params.font.size(font_style_size);
+ std::string str_sender;
+
if(gAgentID != mFromID)
str_sender = mFromName;
else
@@ -180,12 +184,12 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
{
if (mFromName.size() > 0)
{
- style_params.italic= true;
+ style_params.font.style = "ITALIC";
msg_text->setText(mFromName, style_params);
}
mText = mText.substr(3);
- style_params.underline = true;
+ style_params.font.style = "UNDERLINE";
msg_text->addText(mText,style_params);
}
else
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 27df6be730..bd6936f05c 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -80,7 +80,7 @@ public:
draw_rect.mRight, draw_rect.mTop,
mStyle->getColor(),
LLFontGL::RIGHT, LLFontGL::TOP,
- mStyle->getFontStyle(),
+ 0,
mStyle->getShadowType(),
end - start, draw_rect.getWidth(),
&right_x,
@@ -164,7 +164,8 @@ void LLExpandableTextBox::LLTextBoxEx::showExpandText()
S32 last_line = visible_lines.second - 1;
LLStyle::Params expander_style = getDefaultStyle();
- expander_style.underline = true;
+ expander_style.font.name(LLFontGL::nameFromFont(expander_style.font));
+ expander_style.font.style = "UNDERLINE";
expander_style.color = LLUIColorTable::instance().getColor("HTMLLinkColor");
LLExpanderSegment* expanderp = new LLExpanderSegment(new LLStyle(expander_style), getLineStart(last_line), getLength() + 1, mExpanderLabel, *this);
insertSegment(expanderp);
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
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 3af9448564..cae5c52378 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -157,25 +157,29 @@ void LLNearbyChat::addMessage(const LLChat& chat)
{
std::string message = chat.mText;
std::string prefix = message.substr(0, 4);
+
if (chat.mChatStyle == CHAT_STYLE_IRC)
{
+ 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.name(font_name);
+ append_style_params.font.size(font_size);
if (chat.mFromName.size() > 0)
{
- append_style_params.italic= true;
+ append_style_params.font.style = "ITALIC";
LLChat add_chat=chat;
add_chat.mText = chat.mFromName + " ";
mChatHistory->appendWidgetMessage(add_chat, append_style_params);
}
- message = message.substr(3);
- LLColor4 txt_color = LLUIColorTable::instance().getColor("White");
- LLViewerChat::getChatColor(chat,txt_color);
- LLFontGL* fontp = LLViewerChat::getChatFont();
- append_style_params.color(txt_color);
- append_style_params.readonly_color(txt_color);
- append_style_params.font(fontp);
- append_style_params.underline = true;
+ message = message.substr(3);
+ append_style_params.font.style = "UNDERLINE";
mChatHistory->appendText(message, FALSE, append_style_params);
}
else
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index 3acab85bf7..d2cc6d0726 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -51,14 +51,20 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
mReplyBtn = getChild<LLButton>("reply");
LLStyle::Params style_params;
+ style_params.font.name(LLFontGL::nameFromFont(style_params.font));
+ style_params.font.size(LLFontGL::sizeFromFont(style_params.font));
+ style_params.font.style = "UNDERLINE";
+
//Handle IRC styled /me messages.
std::string prefix = p.message.substr(0, 4);
if (prefix == "/me " || prefix == "/me'")
{
mMessage->clear();
- style_params.italic = true;
+
+ style_params.font.style ="ITALIC";
mMessage->appendText(p.from + " ", FALSE, style_params);
- style_params.underline = true;
+
+ style_params.font.style = "UNDERLINE";
mMessage->appendText(p.message.substr(3), FALSE, style_params);
}
else