diff options
author | Rick Pasetto <rick@lindenlab.com> | 2009-11-11 16:14:19 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2009-11-11 16:14:19 -0800 |
commit | 4a376104f16e54651db298128f9c8f740e72bd83 (patch) | |
tree | 0233081c6a11d20d2b57e2d5655c0c673c5ed9bd /indra/llui/llscrolllistcell.cpp | |
parent | eda34b82ee20ce43362b3fb20e809f97cc8c0081 (diff) | |
parent | bea3b937d9907e4491caaec909cd404d401694ac (diff) |
Automated merge with ssh://rick@hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/llui/llscrolllistcell.cpp')
-rw-r--r-- | indra/llui/llscrolllistcell.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp index a7c268758a..544352176a 100644 --- a/indra/llui/llscrolllistcell.cpp +++ b/indra/llui/llscrolllistcell.cpp @@ -71,7 +71,8 @@ LLScrollListCell* LLScrollListCell::create(const LLScrollListCell::Params& cell_ LLScrollListCell::LLScrollListCell(const LLScrollListCell::Params& p) -: mWidth(p.width) +: mWidth(p.width), + mToolTip(p.tool_tip) {} // virtual @@ -204,13 +205,28 @@ BOOL LLScrollListText::isText() const return TRUE; } +// virtual +const std::string &LLScrollListText::getToolTip() const +{ + // If base class has a tooltip, return that + if (! LLScrollListCell::getToolTip().empty()) + return LLScrollListCell::getToolTip(); + + // ...otherwise, return the value itself as the tooltip + return mText.getString(); +} + +// virtual BOOL LLScrollListText::needsToolTip() const { - // show tooltips for truncated text + // If base class has a tooltip, return that + if (LLScrollListCell::needsToolTip()) + return LLScrollListCell::needsToolTip(); + + // ...otherwise, show tooltips for truncated text return mFont->getWidth(mText.getString()) > getWidth(); } - //virtual BOOL LLScrollListText::getVisible() const { |