From 7902899df5f22794d5ccd2d977d2cb1361021d5e Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 3 Jun 2010 16:21:56 +0300 Subject: EXT-7511 FIXED Fixed problems in appearance UI - Made slight changes in xml according to requirements. - Added mForceNoLinksOnIcons bool member to LLPanelInventoryListItemBase. It is used in LLPanelWearableListItem to disable showing of link icons as was requested in ticket. - Created icon for divider 3 pixels high as asked by Erica in EXT-7233. To properly show and hide it made changes to LLCOFWearables::buildClothingListItem which now not only showes separator but also reshapes panel depending on its visibility. Increased heights of body parts, dummy clothing and attachment items because dividers are now 2 pxls higher and they always have dividers. Changed heights of buttons accordingly. Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/502/ --HG-- branch : product-engine --- indra/newview/llinventoryitemslist.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventoryitemslist.cpp') diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 750cdfb678..cd0e976a79 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -132,7 +132,8 @@ BOOL LLPanelInventoryListItemBase::postBuild() setIconCtrl(getChild("item_icon")); setTitleCtrl(getChild("item_name")); - mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), mItem->getIsLinkType(), mItem->getFlags(), FALSE); + BOOL show_links = mForceNoLinksOnIcons ? FALSE : mItem->getIsLinkType(); + mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), show_links, mItem->getFlags(), FALSE); setNeedsRefresh(true); @@ -198,6 +199,7 @@ LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem , mLeftWidgetsWidth(0) , mRightWidgetsWidth(0) , mNeedsRefresh(false) +, mForceNoLinksOnIcons(false) { } -- cgit v1.2.3 From e414a91d7fb8ffea664bf1c035cb0bab3c4ece7e Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 9 Jun 2010 17:09:42 -0400 Subject: EXT-7430 : Create art overlay for inventory icons that are links Took out explicit _Link icons and replaced with overlay. Removed links overlays from non-main-inventory-floater panels. --- indra/newview/llinventoryitemslist.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/llinventoryitemslist.cpp') diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index cd0e976a79..3e5f8d9848 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -132,8 +132,7 @@ BOOL LLPanelInventoryListItemBase::postBuild() setIconCtrl(getChild("item_icon")); setTitleCtrl(getChild("item_name")); - BOOL show_links = mForceNoLinksOnIcons ? FALSE : mItem->getIsLinkType(); - mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), show_links, mItem->getFlags(), FALSE); + mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), mItem->getFlags(), FALSE); setNeedsRefresh(true); @@ -199,7 +198,6 @@ LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem , mLeftWidgetsWidth(0) , mRightWidgetsWidth(0) , mNeedsRefresh(false) -, mForceNoLinksOnIcons(false) { } -- cgit v1.2.3 From 0480e29597a354279119c28839710b54bc030bc7 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 10 Jun 2010 15:42:23 +0300 Subject: EXT-7609 FIXED Added worn items indication in Appearance panel. - Added (worn) suffix to indicate worn item of LLPanelInventoryListItemBase type (all flat list items in Appearance panel). - Used LLOutfitObserver for updating (worn) suffix when user wears an item from My Outfits list. - Added updating only items and links to items with specific UUIDs in LLWearableItemsList. Reviewed by Vadim Savchuk https://codereview.productengine.com/secondlife/r/551/ --HG-- branch : product-engine --- indra/newview/llinventoryitemslist.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventoryitemslist.cpp') diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index cd0e976a79..a9814a1b9a 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -79,7 +79,15 @@ void LLPanelInventoryListItemBase::draw() void LLPanelInventoryListItemBase::updateItem() { setIconImage(mIconImage); - setTitle(mItem->getName(), mHighlightedText); + + std::string name = mItem->getName(); + + if (get_is_item_worn(mItem->getUUID())) + { + name += LLTrans::getString("worn"); + } + + setTitle(name, mHighlightedText); } void LLPanelInventoryListItemBase::addWidgetToLeftSide(const std::string& name, bool show_widget/* = true*/) -- cgit v1.2.3 From ab399e0cd5dfe4045f275ac3e8ee9b02266ac780 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 10 Jun 2010 22:49:25 +0300 Subject: EXT-7609 FIXED Item name (worn) suffix made searchable. - Wearable list items filter now searches sub-string in whole item title including (worn) suffix. - Removed (worn) indication from items which don't need it in Edit Outfit. Only worn items can be edited there. - Added null pointer checks for inventory item member of LLPanelInventoryListItemBase class and its descendants. Reviewed by Vadim Savchuk https://codereview.productengine.com/secondlife/r/551/. --HG-- branch : product-engine --- indra/newview/llinventoryitemslist.cpp | 60 +++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 12 deletions(-) (limited to 'indra/newview/llinventoryitemslist.cpp') diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 55cb2619cf..23ea786484 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -70,23 +70,19 @@ void LLPanelInventoryListItemBase::draw() { if (getNeedsRefresh()) { - updateItem(); + if (mItem) + { + updateItem(mItem->getName()); + } setNeedsRefresh(false); } LLPanel::draw(); } -void LLPanelInventoryListItemBase::updateItem() +// virtual +void LLPanelInventoryListItemBase::updateItem(const std::string& name) { setIconImage(mIconImage); - - std::string name = mItem->getName(); - - if (get_is_item_worn(mItem->getUUID())) - { - name += LLTrans::getString("worn"); - } - setTitle(name, mHighlightedText); } @@ -140,7 +136,11 @@ BOOL LLPanelInventoryListItemBase::postBuild() setIconCtrl(getChild("item_icon")); setTitleCtrl(getChild("item_name")); - mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), mItem->getFlags(), FALSE); + if (mItem) + { + mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), mItem->getFlags(), FALSE); + updateItem(mItem->getName()); + } setNeedsRefresh(true); @@ -169,6 +169,42 @@ void LLPanelInventoryListItemBase::onMouseLeave(S32 x, S32 y, MASK mask) LLPanel::onMouseLeave(x, y, mask); } +const std::string& LLPanelInventoryListItemBase::getItemName() const +{ + if (!mItem) + { + return LLStringUtil::null; + } + return mItem->getName(); +} + +LLAssetType::EType LLPanelInventoryListItemBase::getType() const +{ + if (!mItem) + { + return LLAssetType::AT_NONE; + } + return mItem->getType(); +} + +LLWearableType::EType LLPanelInventoryListItemBase::getWearableType() const +{ + if (!mItem) + { + return LLWearableType::WT_NONE; + } + return mItem->getWearableType(); +} + +const std::string& LLPanelInventoryListItemBase::getDescription() const +{ + if (!mItem) + { + return LLStringUtil::null; + } + return mItem->getDescription(); +} + S32 LLPanelInventoryListItemBase::notify(const LLSD& info) { S32 rv = 0; @@ -176,7 +212,7 @@ S32 LLPanelInventoryListItemBase::notify(const LLSD& info) { mHighlightedText = info["match_filter"].asString(); - std::string test(mItem->getName()); + std::string test(mTitleCtrl->getText()); LLStringUtil::toUpper(test); if(mHighlightedText.empty() || std::string::npos != test.find(mHighlightedText)) -- cgit v1.2.3 From b9a468aff6b4b9bdaf4ac0ab2a309902c6c203ed Mon Sep 17 00:00:00 2001 From: Vladimir Pchelko Date: Wed, 16 Jun 2010 13:53:39 +0300 Subject: EXT-7751 FIXED Sets title text for ToolTip and show ToolTip when title text > text boxsize Reviewed by Vadim Savchuk and Mike Antipov at https://codereview.productengine.com/secondlife/r/576/ --HG-- branch : product-engine --- indra/newview/llinventoryitemslist.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventoryitemslist.cpp') diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 23ea786484..c4efd70385 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -288,11 +288,23 @@ void LLPanelInventoryListItemBase::setIconImage(const LLUIImagePtr& image) void LLPanelInventoryListItemBase::setTitle(const std::string& title, const std::string& highlit_text) { + setToolTip(title); + LLTextUtil::textboxSetHighlightedVal( mTitleCtrl, LLStyle::Params(), title, - highlit_text); + highlit_text); +} + +BOOL LLPanelInventoryListItemBase::handleToolTip( S32 x, S32 y, MASK mask) +{ + LLTextBox* item_name = getChild("item_name"); + if (item_name->getRect().getWidth() < item_name->getTextPixelWidth()) + { + return LLPanel::handleToolTip(x,y,mask); + } + return FALSE; } void LLPanelInventoryListItemBase::reshapeLeftWidgets() -- cgit v1.2.3 From ca211101354633144e55f91f58db2a271b0a666d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 17 Jun 2010 11:47:53 +0100 Subject: grr, dos2unix again --- indra/newview/llinventoryitemslist.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llinventoryitemslist.cpp') diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index c4efd70385..384b24210c 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -288,23 +288,23 @@ void LLPanelInventoryListItemBase::setIconImage(const LLUIImagePtr& image) void LLPanelInventoryListItemBase::setTitle(const std::string& title, const std::string& highlit_text) { - setToolTip(title); + setToolTip(title); LLTextUtil::textboxSetHighlightedVal( mTitleCtrl, LLStyle::Params(), title, - highlit_text); + highlit_text); } -BOOL LLPanelInventoryListItemBase::handleToolTip( S32 x, S32 y, MASK mask) -{ - LLTextBox* item_name = getChild("item_name"); - if (item_name->getRect().getWidth() < item_name->getTextPixelWidth()) - { - return LLPanel::handleToolTip(x,y,mask); - } - return FALSE; +BOOL LLPanelInventoryListItemBase::handleToolTip( S32 x, S32 y, MASK mask) +{ + LLTextBox* item_name = getChild("item_name"); + if (item_name->getRect().getWidth() < item_name->getTextPixelWidth()) + { + return LLPanel::handleToolTip(x,y,mask); + } + return FALSE; } void LLPanelInventoryListItemBase::reshapeLeftWidgets() -- cgit v1.2.3 From 8d2ddff47e973c1692b42081e74dba3ad7745fdd Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 17 Jun 2010 17:42:09 +0300 Subject: EXT-7609 FIXED Added worn items indication with bold text. Fixed updating worn items indication. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/551/. --HG-- branch : product-engine --- indra/newview/llinventoryitemslist.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llinventoryitemslist.cpp') diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 384b24210c..f7a07b260b 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -80,10 +80,11 @@ void LLPanelInventoryListItemBase::draw() } // virtual -void LLPanelInventoryListItemBase::updateItem(const std::string& name) +void LLPanelInventoryListItemBase::updateItem(const std::string& name, + const LLStyle::Params& input_params) { setIconImage(mIconImage); - setTitle(name, mHighlightedText); + setTitle(name, mHighlightedText, input_params); } void LLPanelInventoryListItemBase::addWidgetToLeftSide(const std::string& name, bool show_widget/* = true*/) @@ -286,13 +287,15 @@ void LLPanelInventoryListItemBase::setIconImage(const LLUIImagePtr& image) } } -void LLPanelInventoryListItemBase::setTitle(const std::string& title, const std::string& highlit_text) +void LLPanelInventoryListItemBase::setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params) { setToolTip(title); LLTextUtil::textboxSetHighlightedVal( mTitleCtrl, - LLStyle::Params(), + input_params, title, highlit_text); } -- cgit v1.2.3 From 451ee947d6b28beb28e0bde67b19266aea251825 Mon Sep 17 00:00:00 2001 From: Vladimir Pchelko Date: Thu, 17 Jun 2010 21:30:22 +0300 Subject: EXT-7751 FIXED Show tooltip condition was updated Fix descrition: Show tooltip, for long-named items (title text size > text box size) when mouse over text box rectangle. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/576/ --HG-- branch : product-engine --- indra/newview/llinventoryitemslist.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview/llinventoryitemslist.cpp') diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index f7a07b260b..14de5442d6 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -291,7 +291,7 @@ void LLPanelInventoryListItemBase::setTitle(const std::string& title, const std::string& highlit_text, const LLStyle::Params& input_params) { - setToolTip(title); + mTitleCtrl->setToolTip(title); LLTextUtil::textboxSetHighlightedVal( mTitleCtrl, @@ -302,12 +302,13 @@ void LLPanelInventoryListItemBase::setTitle(const std::string& title, BOOL LLPanelInventoryListItemBase::handleToolTip( S32 x, S32 y, MASK mask) { - LLTextBox* item_name = getChild("item_name"); - if (item_name->getRect().getWidth() < item_name->getTextPixelWidth()) + LLRect text_box_rect = mTitleCtrl->getRect(); + if (text_box_rect.pointInRect(x, y) && + mTitleCtrl->getTextPixelWidth() <= text_box_rect.getWidth()) { - return LLPanel::handleToolTip(x,y,mask); + return FALSE; } - return FALSE; + return LLPanel::handleToolTip(x, y, mask); } void LLPanelInventoryListItemBase::reshapeLeftWidgets() -- cgit v1.2.3