summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-02-26 13:41:47 -0800
committerJames Cook <james@lindenlab.com>2010-02-26 13:41:47 -0800
commitd2680b86170255e701d44e51ab9f5883a9fd61d8 (patch)
treede2f4133b24b6180783155b39214dd98dfbaf44e /indra/newview/llvoavatar.cpp
parent86d8b98f51e9878ff2c97d5b2531e1b6594383f4 (diff)
Less ugly name tag fonts and colors
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 8e017b2a51..93662a030f 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2801,7 +2801,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
{
std::string title_str = title->getString();
LLStringFn::replace_ascii_controlchars(title_str,LL_UNKNOWN_CHAR);
- addNameTagLine(title_str, name_tag_color, LLFontGL::ITALIC,
+ addNameTagLine(title_str, name_tag_color, LLFontGL::NORMAL,
LLFontGL::getFontSansSerifSmall());
}
@@ -2827,7 +2827,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
if (show_slids)
{
- addNameTagLine(av_name.mSLID, LLColor4::red, LLFontGL::NORMAL,
+ addNameTagLine(av_name.mSLID, name_tag_color, LLFontGL::NORMAL,
LLFontGL::getFontSansSerif());
}
}
@@ -2835,9 +2835,13 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
{
if (show_display_names || show_slids)
{
+
+ static LLUICachedControl<bool> small_avatar_names("SmallAvatarNames");
+ const LLFontGL* font =
+ (small_avatar_names ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifBig() );
std::string full_name =
LLCacheName::buildFullName( firstname->getString(), lastname->getString() );
- addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, NULL);
+ addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font);
}
}
@@ -2868,7 +2872,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
// trim last ", "
line.resize( line.length() - 2 );
- addNameTagLine(line, LLColor4::blue, LLFontGL::NORMAL,
+ addNameTagLine(line, name_tag_color, LLFontGL::NORMAL,
LLFontGL::getFontSansSerifSmall());
}
mNameAway = is_away;
@@ -2961,15 +2965,6 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
else
{
// ...not using chat bubbles, just names
- static LLUICachedControl<bool> small_avatar_names("SmallAvatarNames");
- if (small_avatar_names)
- {
- mNameText->setFont(LLFontGL::getFontSansSerif());
- }
- else
- {
- mNameText->setFont(LLFontGL::getFontSansSerifBig());
- }
mNameText->setTextAlignment(LLHUDText::ALIGN_TEXT_CENTER);
mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f);
mNameText->setVisibleOffScreen(FALSE);