summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-03-25 18:28:23 +0000
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-03-25 18:28:23 +0000
commitfd2e544d558976aac3b452fabfb4c13aeb16aaf0 (patch)
tree0b2f0844c98058c7b426495b3a5cf2d295c81389 /indra/newview/llvoavatar.cpp
parent790dff05d0a9c2341db1c02cd9fb332ac4b6f76f (diff)
SL-12478 Long names are not beautiful in nametags
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index ee9ca213d5..96a9e8f222 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3250,7 +3250,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::NORMAL,
- LLFontGL::getFontSansSerifSmall());
+ LLFontGL::getFontSansSerifSmall(), true);
}
static LLUICachedControl<bool> show_display_names("NameTagShowDisplayNames", true);
@@ -3270,7 +3270,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
if (show_display_names)
{
addNameTagLine(av_name.getDisplayName(), name_tag_color, LLFontGL::NORMAL,
- LLFontGL::getFontSansSerif());
+ LLFontGL::getFontSansSerif(), true);
}
// Suppress SLID display if display name matches exactly (ugh)
if (show_usernames && !av_name.isDisplayNameDefault())
@@ -3278,14 +3278,14 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
// *HACK: Desaturate the color
LLColor4 username_color = name_tag_color * 0.83f;
addNameTagLine(av_name.getUserName(), username_color, LLFontGL::NORMAL,
- LLFontGL::getFontSansSerifSmall());
+ LLFontGL::getFontSansSerifSmall(), true);
}
}
else
{
const LLFontGL* font = LLFontGL::getFontSansSerif();
std::string full_name = LLCacheName::buildFullName( firstname->getString(), lastname->getString() );
- addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font);
+ addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font, true);
}
mNameAway = is_away;
@@ -3377,7 +3377,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
}
-void LLVOAvatar::addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font)
+void LLVOAvatar::addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font, const bool use_ellipses)
{
llassert(mNameText);
if (mVisibleChat)
@@ -3386,7 +3386,7 @@ void LLVOAvatar::addNameTagLine(const std::string& line, const LLColor4& color,
}
else
{
- mNameText->addLine(line, color, (LLFontGL::StyleFlags)style, font);
+ mNameText->addLine(line, color, (LLFontGL::StyleFlags)style, font, use_ellipses);
}
mNameIsSet |= !line.empty();
}