Skip to content
Snippets Groups Projects
Commit 2d0dfbca authored by Leslie Linden's avatar Leslie Linden
Browse files

* Added tooltips to the toolbar buttons.

Reviewed by Richard.
parent 37fdd27b
No related branches found
No related tags found
No related merge requests found
...@@ -511,10 +511,13 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id) ...@@ -511,10 +511,13 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
LLCommand* commandp = LLCommandManager::instance().getCommand(id); LLCommand* commandp = LLCommandManager::instance().getCommand(id);
if (!commandp) return NULL; if (!commandp) return NULL;
std::string label = LLTrans::getString(commandp->labelRef());
std::string tooltip = label + "\n" + LLTrans::getString(commandp->tooltipRef());
LLToolBarButton::Params button_p; LLToolBarButton::Params button_p;
button_p.name = id.name(); button_p.name = id.name();
button_p.label = LLTrans::getString(commandp->labelRef()); button_p.label = label;
button_p.tool_tip = button_p.label(); button_p.tool_tip = tooltip;
button_p.image_overlay = LLUI::getUIImage(commandp->icon()); button_p.image_overlay = LLUI::getUIImage(commandp->icon());
button_p.overwriteFrom(mButtonParams[mButtonType]); button_p.overwriteFrom(mButtonParams[mButtonType]);
LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p); LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment