diff options
author | Leslie Linden <none@none> | 2011-07-11 17:45:29 -0700 |
---|---|---|
committer | Leslie Linden <none@none> | 2011-07-11 17:45:29 -0700 |
commit | 18e8d57b210fd5a7ca1bb8fc114a3e4faf8bf537 (patch) | |
tree | 114e914298bd5d06cb5082a81731d9f45580428e /indra/newview | |
parent | 85ddc48e089b8c0b64ca8c224d0cbf1e1509a9c3 (diff) |
EXP-995 FIX -- New icon scrolls into Received Items panel heading
EXP-903 FIX -- Newness/Freshness number does not decrease as items are opened in Inbox
* Brought back freshness with the freshness
* New badge and label color from Gibson
* Inventory Panel now allows display of badges with proper clipping
Reviewed by Richard.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.h | 3 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceinbox.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceinboxinventory.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceinboxinventory.h | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/colors.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/widgets/Badge_Background_New.png | bin | 0 -> 1369 bytes | |||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/badge.xml | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml | 11 |
9 files changed, 53 insertions, 11 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 702e8d5a1f..d5d40ca65d 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -902,6 +902,18 @@ void LLInventoryPanel::onFocusReceived() LLPanel::onFocusReceived(); } +bool LLInventoryPanel::addBadge(LLBadge * badge) +{ + bool badge_added = false; + + if (acceptsBadge()) + { + badge_added = badge->addToView(mFolderRoot); + } + + return badge_added; +} + void LLInventoryPanel::openAllFolders() { mFolderRoot->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index a4287a438e..7676bbb6d7 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -125,6 +125,9 @@ public: /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); + // LLBadgeHolder methods + bool addBadge(LLBadge * badge); + // Call this method to set the selection. void openAllFolders(); void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus); diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index 28025f58d4..3accc43ab6 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -27,6 +27,7 @@ #include "llviewerprecompiledheaders.h"
#include "llpanelmarketplaceinbox.h"
+#include "llpanelmarketplaceinboxinventory.h"
#include "llappviewer.h"
#include "llbutton.h"
@@ -36,7 +37,7 @@ #include "llviewercontrol.h"
-#define SUPPORTING_FRESH_ITEM_COUNT 0
+#define SUPPORTING_FRESH_ITEM_COUNT 1
static LLRegisterPanelClassWrapper<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox");
@@ -159,10 +160,10 @@ U32 LLPanelMarketplaceInbox::getFreshItemCount() const for (; folders_it != folders_end; ++folders_it)
{
- const LLFolderViewFolder * folder = *folders_it;
+ const LLFolderViewFolder * folder_view = *folders_it;
+ const LLInboxFolderViewFolder * inbox_folder_view = dynamic_cast<const LLInboxFolderViewFolder*>(folder_view);
- // TODO: Replace this check with new "fresh" flag
- if (folder->getCreationDate() > 1500)
+ if (inbox_folder_view && inbox_folder_view->isFresh())
{
fresh_item_count++;
}
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 5dff73ee6a..8542ea2ae4 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -141,7 +141,7 @@ LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge LLInboxFolderViewFolder::LLInboxFolderViewFolder(const Params& p) : LLFolderViewFolder(p) , LLBadgeOwner(getHandle()) - , mFresh(false) + , mFresh(true) { initBadgeParams(p.new_badge()); } @@ -151,6 +151,19 @@ LLInboxFolderViewFolder::~LLInboxFolderViewFolder() } // virtual +time_t LLInboxFolderViewFolder::getCreationDate() const +{ + time_t ret_val = LLFolderViewFolder::getCreationDate(); + + if (!mCreationDate) + { + updateFlag(); + } + + return ret_val; +} + +// virtual void LLInboxFolderViewFolder::draw() { if (!badgeHasParent()) @@ -166,10 +179,7 @@ void LLInboxFolderViewFolder::draw() void LLInboxFolderViewFolder::updateFlag() const { LLDate saved_freshness_date = LLDate(gSavedSettings.getString("InboxFreshnessDate")); - if (getCreationDate() > saved_freshness_date.secondsSinceEpoch()) - { - mFresh = true; - } + mFresh = (mCreationDate > saved_freshness_date.secondsSinceEpoch()); } void LLInboxFolderViewFolder::selectItem() diff --git a/indra/newview/llpanelmarketplaceinboxinventory.h b/indra/newview/llpanelmarketplaceinboxinventory.h index 7b124fdccc..899e459896 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.h +++ b/indra/newview/llpanelmarketplaceinboxinventory.h @@ -66,12 +66,16 @@ public: LLInboxFolderViewFolder(const Params& p); ~LLInboxFolderViewFolder(); + + time_t getCreationDate() const; void draw(); void updateFlag() const; void selectItem(); void toggleOpen(); + + bool isFresh() const { return mFresh; } protected: void setCreationDate(time_t creation_date_utc) const; diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 76965ad14b..31b6fc77f5 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -134,7 +134,7 @@ reference="AvatarListItemIconOfflineColor" /> <color name="BadgeImageColor" - value="0.44 0.69 0.56 1.0" /> + value="1.0 0.40 0.0 1.0" /> <color name="BadgeBorderColor" value="0.9 0.9 0.9 1.0" /> diff --git a/indra/newview/skins/default/textures/widgets/Badge_Background_New.png b/indra/newview/skins/default/textures/widgets/Badge_Background_New.png Binary files differnew file mode 100644 index 0000000000..9f114f2e4a --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/Badge_Background_New.png diff --git a/indra/newview/skins/default/xui/en/widgets/badge.xml b/indra/newview/skins/default/xui/en/widgets/badge.xml index f77c4b7178..2d4c02b092 100644 --- a/indra/newview/skins/default/xui/en/widgets/badge.xml +++ b/indra/newview/skins/default/xui/en/widgets/badge.xml @@ -7,11 +7,14 @@ image="Badge_Background" image_color="BadgeImageColor" label_color="BadgeLabelColor" + label_offset_horiz="0" + label_offset_vert="0" location="top_left" location_percent_hcenter="85" location_percent_vcenter="85" padding_horiz="7" padding_vert="4" requests_front="true" + mouse_opaque="false" > </badge> diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml index c34aec1bf0..95f5cf2ecd 100644 --- a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml +++ b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml @@ -6,5 +6,14 @@ item_top_pad="4" selection_image="Rounded_Square" > - <new_badge label="New" location="right" padding_horiz="4" padding_vert="2" location_percent_hcenter="70" /> + <new_badge + label="New" + label_offset_horiz="-1" + location="right" + padding_horiz="4" + padding_vert="1" + location_percent_hcenter="70" + border_image="" + image="Badge_Background_New" + /> </inbox_folder_view_folder> |