Skip to content
Snippets Groups Projects
Commit 2773a3bb authored by Mike Antipov's avatar Mike Antipov
Browse files

Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make...

Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make Voice states and fade timeout xml driven)
-- added possibility to set avatar item online/offline styles via xml.
-- commited fake xml panel file with styles missed in previous commit.

--HG--
branch : product-engine
parent 46948d9f
No related branches found
No related tags found
No related merge requests found
...@@ -166,8 +166,7 @@ void LLAvatarListItem::setOnline(bool online) ...@@ -166,8 +166,7 @@ void LLAvatarListItem::setOnline(bool online)
mOnlineStatus = (EOnlineStatus) online; mOnlineStatus = (EOnlineStatus) online;
// Change avatar name font style depending on the new online status. // Change avatar name font style depending on the new online status.
mAvatarNameStyle.color = online ? LLColor4::white : LLColor4::grey; setStyle(online ? IS_ONLINE : IS_OFFLINE);
setNameInternal(mAvatarName->getText(), mHighlihtSubstring);
// Make the icon fade if the avatar goes offline. // Make the icon fade if the avatar goes offline.
mAvatarIcon->setColor(online ? LLColor4::white : LLColor4::smoke); mAvatarIcon->setColor(online ? LLColor4::white : LLColor4::smoke);
...@@ -192,7 +191,7 @@ void LLAvatarListItem::setStyle(EItemStyle voice_state) ...@@ -192,7 +191,7 @@ void LLAvatarListItem::setStyle(EItemStyle voice_state)
// *NOTE: You cannot set the style on a text box anymore, you must // *NOTE: You cannot set the style on a text box anymore, you must
// rebuild the text. This will cause problems if the text contains // rebuild the text. This will cause problems if the text contains
// hyperlinks, as their styles will be wrong. // hyperlinks, as their styles will be wrong.
mAvatarName->setText(mAvatarName->getText(), mAvatarNameStyle); setNameInternal(mAvatarName->getText(), mHighlihtSubstring);
// *TODO: move icon colors into colors.xml // *TODO: move icon colors into colors.xml
mAvatarIcon->setColor(voice_state == IS_VOICE_JOINED ? LLColor4::white : LLColor4::smoke); mAvatarIcon->setColor(voice_state == IS_VOICE_JOINED ? LLColor4::white : LLColor4::smoke);
...@@ -441,6 +440,14 @@ LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() ...@@ -441,6 +440,14 @@ LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams()
item_styles_params_map.insert( item_styles_params_map.insert(
std::make_pair(IS_VOICE_LEFT, std::make_pair(IS_VOICE_LEFT,
params_panel->getChild<LLTextBox>("voice_call_left_style")->getDefaultStyle())); params_panel->getChild<LLTextBox>("voice_call_left_style")->getDefaultStyle()));
item_styles_params_map.insert(
std::make_pair(IS_ONLINE,
params_panel->getChild<LLTextBox>("online_style")->getDefaultStyle()));
item_styles_params_map.insert(
std::make_pair(IS_OFFLINE,
params_panel->getChild<LLTextBox>("offline_style")->getDefaultStyle()));
} }
else else
{ {
...@@ -448,6 +455,8 @@ LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() ...@@ -448,6 +455,8 @@ LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams()
item_styles_params_map.insert(std::make_pair(IS_VOICE_INVITED, LLStyle::Params())); item_styles_params_map.insert(std::make_pair(IS_VOICE_INVITED, LLStyle::Params()));
item_styles_params_map.insert(std::make_pair(IS_VOICE_JOINED, LLStyle::Params())); item_styles_params_map.insert(std::make_pair(IS_VOICE_JOINED, LLStyle::Params()));
item_styles_params_map.insert(std::make_pair(IS_VOICE_LEFT, LLStyle::Params())); item_styles_params_map.insert(std::make_pair(IS_VOICE_LEFT, LLStyle::Params()));
item_styles_params_map.insert(std::make_pair(IS_ONLINE, LLStyle::Params()));
item_styles_params_map.insert(std::make_pair(IS_OFFLINE, LLStyle::Params()));
} }
if (params_panel) params_panel->die(); if (params_panel) params_panel->die();
......
...@@ -51,6 +51,8 @@ class LLAvatarListItem : public LLPanel, public LLFriendObserver ...@@ -51,6 +51,8 @@ class LLAvatarListItem : public LLPanel, public LLFriendObserver
IS_VOICE_INVITED, IS_VOICE_INVITED,
IS_VOICE_JOINED, IS_VOICE_JOINED,
IS_VOICE_LEFT, IS_VOICE_LEFT,
IS_ONLINE,
IS_OFFLINE,
} EItemStyle; } EItemStyle;
class ContextMenu class ContextMenu
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment