diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-08-17 16:46:19 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-08-17 16:46:19 +0300 |
commit | 61e318564e5c492ff7da70ef05f9596c4af8d369 (patch) | |
tree | 2e00c63d34415b4ddd8ad8929e3c2d9f9a84a6bc | |
parent | e67e9f63c30555467ac6a381e229e45150fb2509 (diff) |
SL-13784 Highlight friends' names in Conversations floater
-rw-r--r-- | indra/newview/llconversationview.cpp | 35 | ||||
-rw-r--r-- | indra/newview/llconversationview.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/colors.xml | 3 |
3 files changed, 38 insertions, 3 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 60a5204547..0ca4679ea4 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -31,6 +31,7 @@ #include <boost/bind.hpp> #include "llagentdata.h" +#include "llavataractions.h" #include "llconversationmodel.h" #include "llfloaterimsession.h" #include "llfloaterimnearbychat.h" @@ -432,8 +433,13 @@ void LLConversationViewSession::refresh() vmi->resetRefresh(); if (mSessionTitle) - { - mSessionTitle->setText(vmi->getDisplayName()); + { + if (!highlightFriendTitle(vmi)) + { + LLStyle::Params title_style; + title_style.color = LLUIColorTable::instance().getColor("LabelTextColor"); + mSessionTitle->setText(vmi->getDisplayName(), title_style); + } } // Update all speaking indicators @@ -478,6 +484,22 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi } } +bool LLConversationViewSession::highlightFriendTitle(LLConversationItem* vmi) +{ + if(vmi->getType() == LLConversationItem::CONV_PARTICIPANT || vmi->getType() == LLConversationItem::CONV_SESSION_1_ON_1) + { + LLIMModel::LLIMSession* session= LLIMModel::instance().findIMSession(vmi->getUUID()); + if (session && LLAvatarActions::isFriend(session->mOtherParticipantID)) + { + LLStyle::Params title_style; + title_style.color = LLUIColorTable::instance().getColor("ConversationFriendColor"); + mSessionTitle->setText(vmi->getDisplayName(), title_style); + return true; + } + } + return false; +} + // // Implementation of conversations list participant (avatar) widgets // @@ -576,7 +598,14 @@ void LLConversationViewParticipant::draw() } else { - color = mIsSelected ? sHighlightFgColor : sFgColor; + if (LLAvatarActions::isFriend(mUUID)) + { + color = LLUIColorTable::instance().getColor("ConversationFriendColor"); + } + else + { + color = mIsSelected ? sHighlightFgColor : sFgColor; + } } LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(getViewModelItem()); diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 420c250dfe..5b2fd6b7c4 100644 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -35,6 +35,7 @@ class LLTextBox; class LLFloaterIMContainer; +class LLConversationItem; class LLConversationViewSession; class LLConversationViewParticipant; @@ -92,6 +93,8 @@ public: LLFloater* getSessionFloater(); bool isInActiveVoiceChannel() { return mIsInActiveVoiceChannel; } + bool highlightFriendTitle(LLConversationItem* vmi); + private: void onCurrentVoiceSessionChanged(const LLUUID& session_id); diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index e0da7f5d9e..601d5621a9 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -334,6 +334,9 @@ name="ContextSilhouetteColor" reference="EmphasisColor" /> <color + name="ConversationFriendColor" + value="0.42 0.85 0.71 1" /> + <color name="DefaultHighlightDark" reference="White_10" /> <color |