EXT-7737 ADDITIONAL FIX Added changing of color to emphasis for selected outfit accordion header.
- Added method to accordion which allows to set color of its header's title and used it when highliting selected outfit. - Set alias for emphasis color in colors.xml to let selected outfit color be easily changed via xml in case such decision is made(because leaving it green doesn't seem a very good idea). - Also added alias for accordion header text color to avoid breaking of this fix if in header_text_color from accordion_tab.xml. --HG-- branch : product-enginemaster
parent
625d90f690
commit
1a3b463af3
|
|
@ -78,6 +78,8 @@ public:
|
|||
|
||||
void setTitleFontStyle(std::string style);
|
||||
|
||||
void setTitleColor(LLUIColor);
|
||||
|
||||
void setSelected(bool is_selected) { mIsSelected = is_selected; }
|
||||
|
||||
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
|
||||
|
|
@ -192,6 +194,14 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitleFontStyle(std::string
|
|||
}
|
||||
}
|
||||
|
||||
void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitleColor(LLUIColor color)
|
||||
{
|
||||
if(mHeaderTextbox)
|
||||
{
|
||||
mHeaderTextbox->setColor(color);
|
||||
}
|
||||
}
|
||||
|
||||
void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw()
|
||||
{
|
||||
S32 width = getRect().getWidth();
|
||||
|
|
@ -520,6 +530,15 @@ void LLAccordionCtrlTab::setTitleFontStyle(std::string style)
|
|||
}
|
||||
}
|
||||
|
||||
void LLAccordionCtrlTab::setTitleColor(LLUIColor color)
|
||||
{
|
||||
LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME);
|
||||
if (header)
|
||||
{
|
||||
header->setTitleColor(color);
|
||||
}
|
||||
}
|
||||
|
||||
boost::signals2::connection LLAccordionCtrlTab::setFocusReceivedCallback(const focus_signal_t::slot_type& cb)
|
||||
{
|
||||
LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME);
|
||||
|
|
|
|||
|
|
@ -124,6 +124,9 @@ public:
|
|||
// Set text font style in LLAccordionCtrlTabHeader
|
||||
void setTitleFontStyle(std::string style);
|
||||
|
||||
// Set text color in LLAccordionCtrlTabHeader
|
||||
void setTitleColor(LLUIColor color);
|
||||
|
||||
boost::signals2::connection setFocusReceivedCallback(const focus_signal_t::slot_type& cb);
|
||||
boost::signals2::connection setFocusLostCallback(const focus_signal_t::slot_type& cb);
|
||||
|
||||
|
|
|
|||
|
|
@ -548,6 +548,7 @@ void LLOutfitsList::highlightBaseOutfit()
|
|||
if (mOutfitsMap[mHighlightedOutfitUUID])
|
||||
{
|
||||
mOutfitsMap[mHighlightedOutfitUUID]->setTitleFontStyle("NORMAL");
|
||||
mOutfitsMap[mHighlightedOutfitUUID]->setTitleColor(LLUIColorTable::instance().getColor("AccordionHeaderTextColor"));
|
||||
}
|
||||
|
||||
mHighlightedOutfitUUID = base_id;
|
||||
|
|
@ -555,6 +556,7 @@ void LLOutfitsList::highlightBaseOutfit()
|
|||
if (mOutfitsMap[base_id])
|
||||
{
|
||||
mOutfitsMap[base_id]->setTitleFontStyle("BOLD");
|
||||
mOutfitsMap[base_id]->setTitleColor(LLUIColorTable::instance().getColor("SelectedOutfitTextColor"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,6 +96,9 @@
|
|||
|
||||
<!-- UI Definitions -->
|
||||
|
||||
<color
|
||||
name="AccordionHeaderTextColor"
|
||||
reference="LtGray" />
|
||||
<color
|
||||
name="AgentChatColor"
|
||||
reference="White" />
|
||||
|
|
@ -645,6 +648,9 @@
|
|||
<color
|
||||
name="ScrollbarTrackColor"
|
||||
reference="Black" />
|
||||
<color
|
||||
name="SelectedOutfitTextColor"
|
||||
reference="EmphasisColor" />
|
||||
<color
|
||||
name="SilhouetteChildColor"
|
||||
value="0.13 0.42 0.77 1" />
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@
|
|||
header_image_over="Accordion_Over"
|
||||
header_image_pressed="Accordion_Press"
|
||||
header_image_focused="Accordion_Selected"
|
||||
header_text_color="LtGray"
|
||||
header_text_color="AccordionHeaderTextColor"
|
||||
font="SansSerif"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue