diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 23ea786484a0e1b718fe600f056b940aa0d2400b..c4efd703853589f3235f1f66a3b2907a52ba8d69 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<LLTextBox>("item_name"); + if (item_name->getRect().getWidth() < item_name->getTextPixelWidth()) + { + return LLPanel::handleToolTip(x,y,mask); + } + return FALSE; } void LLPanelInventoryListItemBase::reshapeLeftWidgets() diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index d6132717e86716a7f877743a6177cfa3828dee81..c24e8b63e070c0333635a5f560528e39ca7c4cc5 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -179,6 +179,10 @@ class LLPanelInventoryListItemBase : public LLPanel /** Set item title - inventory item name usually */ virtual void setTitle(const std::string& title, const std::string& highlit_text); + /** + * Show tool tip if item name text size > panel size + */ + virtual BOOL handleToolTip( S32 x, S32 y, MASK mask); LLViewerInventoryItem* mItem;