summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfolderviewitem.cpp23
-rw-r--r--indra/llui/llfolderviewitem.h2
2 files changed, 24 insertions, 1 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 682da226bd..b473b3b395 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -58,6 +58,7 @@ LLUIColor LLFolderViewItem::sFilterBGColor;
LLUIColor LLFolderViewItem::sFilterTextColor;
LLUIColor LLFolderViewItem::sSuffixColor;
LLUIColor LLFolderViewItem::sSearchStatusColor;
+LLUIColor LLFolderViewItem::sFavoriteColor;
// only integers can be initialized in header
const F32 LLFolderViewItem::FOLDER_CLOSE_TIME_CONSTANT = 0.02f;
@@ -173,6 +174,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE);
sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemLinkColor", DEFAULT_WHITE);
sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE);
+ sFavoriteColor = LLUIColorTable::instance().getColor("InventoryFavoriteColor", DEFAULT_WHITE);
sColorSetInitialized = true;
}
@@ -764,6 +766,12 @@ void LLFolderViewItem::drawOpenFolderArrow(const Params& default_params, const L
void LLFolderViewItem::drawFavoriteIcon(const Params& default_params, const LLUIColor& fg_color)
{
+ static LLUICachedControl<bool> draw_star("InventoryFavoritesUseStar", true);
+ if (!draw_star)
+ {
+ return;
+ }
+
LLUIImage* favorite_image = NULL;
if (mIsFavorite)
{
@@ -1019,7 +1027,20 @@ void LLFolderViewItem::draw()
}
}
- LLColor4 color = (mIsSelected && filled) ? mFontHighlightColor : mFontColor;
+ static LLUICachedControl<bool> highlight_color("InventoryFavoritesColorText", true);
+ LLColor4 color;
+ if (mIsSelected && filled)
+ {
+ color = mFontHighlightColor;
+ }
+ else if (mIsFavorite && highlight_color)
+ {
+ color = sFavoriteColor;
+ }
+ else
+ {
+ color = mFontColor;
+ }
if (isFadeItem())
{
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index fc19514615..462f703a9c 100644
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -149,6 +149,8 @@ protected:
static LLUIColor sFilterTextColor;
static LLUIColor sSuffixColor;
static LLUIColor sSearchStatusColor;
+ static LLUIColor sFavoriteColor;
+
// this is an internal method used for adding items to folders. A
// no-op at this level, but reimplemented in derived classes.