From 9007cf3a535bc6028ca700855745130cd4baaff3 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 2 Apr 2010 17:12:13 -0400 Subject: EXT-6696 : Make Library inventory items somehow distinguishable at first glance from My Inventory items Library items are now set to Emphasis Color. This can be easily changed. Also fixed an issue where the "(Loading...)" string was overlapping with folder inventory strings. --- indra/newview/llfolderviewitem.cpp | 16 +++++++++------- indra/newview/skins/default/colors.xml | 3 +++ 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 0a2a33d220..3208218302 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -834,13 +834,17 @@ void LLFolderViewItem::draw() static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE); static LLUIColor sFilterBGColor = LLUIColorTable::instance().getColor("FilterBackgroundColor", DEFAULT_WHITE); static LLUIColor sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE); - static LLUIColor sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemSuffixColor", DEFAULT_WHITE); + static LLUIColor sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemColor", DEFAULT_WHITE); + static LLUIColor sLibraryColor = LLUIColorTable::instance().getColor("InventoryItemLibraryColor", DEFAULT_WHITE); static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); + const Params& default_params = LLUICtrlFactory::getDefaultParams(); const S32 TOP_PAD = default_params.item_top_pad; const S32 FOCUS_LEFT = 1; const LLFontGL* font = getLabelFontForStyle(mLabelStyle); + const BOOL in_inventory = getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(), gInventory.getRootFolderID()); + const BOOL in_library = getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(), gInventory.getLibraryRootFolderID()); //--------------------------------------------------------------------------------// // Draw open folder arrow @@ -961,6 +965,8 @@ void LLFolderViewItem::draw() } LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor; + if (in_library) color = sLibraryColor; + F32 right_x = 0; F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation); @@ -982,8 +988,6 @@ void LLFolderViewItem::draw() S32_MAX, S32_MAX, &right_x, FALSE ); text_left = right_x; } - - //--------------------------------------------------------------------------------// // Draw the actual label text // @@ -995,13 +999,11 @@ void LLFolderViewItem::draw() // Draw "Loading..." text // bool root_is_loading = false; - if (getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(), - gInventory.getRootFolderID())) // Descendent of my inventory + if (in_inventory) { root_is_loading = LLInventoryModelBackgroundFetch::instance().inventoryFetchInProgress(); } - if (getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(), - gInventory.getLibraryRootFolderID())) // Descendent of library + if (in_library) { root_is_loading = LLInventoryModelBackgroundFetch::instance().libraryFetchInProgress(); } diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 0a906a8063..b067e07c81 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -420,6 +420,9 @@ + -- cgit v1.2.3