diff options
| author | Leyla Farazha <leyla@lindenlab.com> | 2010-06-18 10:52:24 -0700 |
|---|---|---|
| committer | Leyla Farazha <leyla@lindenlab.com> | 2010-06-18 10:52:24 -0700 |
| commit | 5985ea0f98013741a3313d67cda430152171e611 (patch) | |
| tree | 038778966d7134071b726536c0501243f0a2ce35 /indra/newview/llinventoryitemslist.cpp | |
| parent | d8ec78e325ee3add1a5968ea0a3051de16958404 (diff) | |
| parent | 005986d19c46008ae53c56e827b2603cd3d2ae92 (diff) | |
Merge
Diffstat (limited to 'indra/newview/llinventoryitemslist.cpp')
| -rw-r--r-- | indra/newview/llinventoryitemslist.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 384b24210c..14de5442d6 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,25 +287,28 @@ 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); + mTitleCtrl->setToolTip(title); LLTextUtil::textboxSetHighlightedVal( mTitleCtrl, - LLStyle::Params(), + input_params, title, 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()) + 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() |
