diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lloutfitslist.cpp | 25 | ||||
-rw-r--r-- | indra/newview/lloutfitslist.h | 3 |
2 files changed, 11 insertions, 17 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index bf413c0438..63ae9c13e1 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -1606,39 +1606,32 @@ bool LLOutfitAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask) void LLOutfitAccordionCtrlTab::setFavorite(bool is_favorite) { mIsFavorite = is_favorite; - static LLUICachedControl<bool> highlight_color("InventoryFavoritesColorText", true); - if (!mIsSelected && mIsFavorite && highlight_color()) - { - setTitleColor(LLUIColorTable::instance().getColor("InventoryFavoriteColor")); - } - else - { - setTitleColor(LLUIColorTable::instance().getColor("AccordionHeaderTextColor")); - } + updateTitleColor(); } void LLOutfitAccordionCtrlTab::setOutfitSelected(bool val) { mIsSelected = val; - if (val) - { - setTitleFontStyle("BOLD"); - setTitleColor(LLUIColorTable::instance().getColor("SelectedOutfitTextColor")); + setTitleFontStyle(mIsSelected ? "BOLD" : "NORMAL"); + updateTitleColor(); } - else + +void LLOutfitAccordionCtrlTab::updateTitleColor() { - setTitleFontStyle("NORMAL"); static LLUICachedControl<bool> highlight_color("InventoryFavoritesColorText", true); if (mIsFavorite && highlight_color()) { setTitleColor(LLUIColorTable::instance().getColor("InventoryFavoriteColor")); } + else if (mIsSelected) + { + setTitleColor(LLUIColorTable::instance().getColor("SelectedOutfitTextColor")); + } else { setTitleColor(LLUIColorTable::instance().getColor("AccordionHeaderTextColor")); } } -} void LLOutfitAccordionCtrlTab::drawFavoriteIcon() { diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index 24dcc5d7bb..bafc0fbb81 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -276,6 +276,7 @@ public: {} friend class LLUICtrlFactory; + void updateTitleColor(); void drawFavoriteIcon(); LLUUID mFolderID; @@ -431,7 +432,7 @@ private: // Used to monitor COF changes for updating items worn state. See EXT-8636. uuid_vec_t mCOFLinkedItems; - LLOutfitListSortMenu* mSortMenu; + LLOutfitListSortMenu* mSortMenu; //bool mIsInitialized; /** |