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