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