diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-10-03 16:37:07 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-10-03 16:37:07 -0700 |
commit | 2d0dfbca99ffa442025358ece6340b894245d3b0 (patch) | |
tree | 26b703afd178f9b72cf6d4036ceeb77373d8ffe5 | |
parent | 37fdd27bcbd38b5cf22e0ff003f4d01b908996c7 (diff) |
* Added tooltips to the toolbar buttons.
Reviewed by Richard.
-rw-r--r-- | indra/llui/lltoolbar.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index c62bbe4e71..c0058d534d 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -511,10 +511,13 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id) LLCommand* commandp = LLCommandManager::instance().getCommand(id); if (!commandp) return NULL; + std::string label = LLTrans::getString(commandp->labelRef()); + std::string tooltip = label + "\n" + LLTrans::getString(commandp->tooltipRef()); + LLToolBarButton::Params button_p; button_p.name = id.name(); - button_p.label = LLTrans::getString(commandp->labelRef()); - button_p.tool_tip = button_p.label(); + button_p.label = label; + button_p.tool_tip = tooltip; button_p.image_overlay = LLUI::getUIImage(commandp->icon()); button_p.overwriteFrom(mButtonParams[mButtonType]); LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p); |