From 154d15d42d4ca200dec9e404464cf86eaa384a32 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 15 Jan 2025 16:14:26 +0200 Subject: #3403 fix Favorited worn outfit not coloured in My Outfits tab --- indra/newview/lloutfitslist.cpp | 25 +++++++++---------------- 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 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 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; /** -- cgit v1.2.3