summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryitemslist.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-06-18 12:24:21 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-06-18 12:24:21 +0100
commit333f60ef3cf1a5ac4ce7687faf8369e7d0a4b2de (patch)
treeedb2169b848d848d834fe6e418c397c10c89a5ff /indra/newview/llinventoryitemslist.cpp
parentcb50a2395bc37f1f7833171a976f67af9f2df66d (diff)
parent9aa710945685a2cae8cfc622f3dc3d900c1ab4c9 (diff)
merge from PE's viewer-release
Diffstat (limited to 'indra/newview/llinventoryitemslist.cpp')
-rw-r--r--indra/newview/llinventoryitemslist.cpp22
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()