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/newview/lloutfitslist.cpp | |
| parent | 0c9f6f50efbde1d489979d1d7348bd480bb46cb2 (diff) | |
#3403 fix Favorited worn outfit not coloured in My Outfits tab
Diffstat (limited to 'indra/newview/lloutfitslist.cpp')
| -rw-r--r-- | indra/newview/lloutfitslist.cpp | 25 |
1 files changed, 9 insertions, 16 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() { |
