diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2025-01-15 16:14:26 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-04-11 00:33:01 +0300 |
commit | 154d15d42d4ca200dec9e404464cf86eaa384a32 (patch) | |
tree | 7f22c6a88df6cc23e4d2ad1cd881ac383e4f6605 /indra | |
parent | 0c9f6f50efbde1d489979d1d7348bd480bb46cb2 (diff) |
#3403 fix Favorited worn outfit not coloured in My Outfits tab
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; /** |