diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 23 | ||||
-rw-r--r-- | indra/newview/skins/default/colors.xml | 9 |
2 files changed, 22 insertions, 10 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9e56357b30..c71cb1feaa 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3069,21 +3069,30 @@ void LLVOAvatar::idleUpdateNameTagAlpha(BOOL new_name, F32 alpha) LLColor4 LLVOAvatar::getNameTagColor(bool is_friend) { - const char* color_name = "NameTagText"; + const char* color_name; if (is_friend) { color_name = "NameTagFriend"; } - else + else if (LLAvatarNameCache::useDisplayNames()) { - // IDEVO can we avoid doing this lookup repeatedly? + // ...color based on whether SLID "matches" a computed display + // name LLAvatarName av_name; - if (LLAvatarNameCache::useDisplayNames() - && LLAvatarNameCache::get(getID(), &av_name) + if (LLAvatarNameCache::get(getID(), &av_name) && av_name.mIsDisplayNameDefault) - { - color_name = "NameTagLegacy"; + { + color_name = "NameTagMatch"; } + else + { + color_name = "NameTagMismatch"; + } + } + else + { + // ...not using display names + color_name = "NameTagLegacy"; } return LLUIColorTable::getInstance()->getColor( color_name ); } diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 1d6c667f24..c1ee420d78 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -531,9 +531,6 @@ name="NameTagChat" reference="White" /> <color - name="NameTagText" - reference="White" /> - <color name="NameTagFriend" reference="EmphasisColor" /> <color @@ -541,6 +538,12 @@ value="1 1 1 1" /> <color name="NameTagLegacy" + reference="White" /> + <color + name="NameTagMatch" + reference="White" /> + <color + name="NameTagMismatch" value="0.984 0.758 0 1" /> <color name="NameTagSLID" |