From b8a672adaf547649d555909f1baa2234d4b46699 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Wed, 11 Nov 2009 18:49:23 +0200 Subject: Fixed low bug EXT-1499 (Finalize the Home panel and add tooltips to the tab grabs). --HG-- branch : product-engine --- indra/newview/llsidetray.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llsidetray.cpp') diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index b25dea92cc..1d9b1261d6 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -389,7 +389,8 @@ bool LLSideTray::selectTabByName (const std::string& name) return true; } -LLButton* LLSideTray::createButton (const std::string& name,const std::string& image,LLUICtrl::commit_callback_t callback) +LLButton* LLSideTray::createButton (const std::string& name,const std::string& image,const std::string& tooltip, + LLUICtrl::commit_callback_t callback) { static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams()); @@ -410,6 +411,9 @@ LLButton* LLSideTray::createButton (const std::string& name,const std::string& i LLButton* button = LLUICtrlFactory::create (bparams); button->setLabel(name); button->setClickedCallback(callback); + + if(tooltip!="Home") + button->setToolTip(tooltip); if(image.length()) { @@ -448,12 +452,12 @@ void LLSideTray::createButtons () // change if the home screen becomes its own tab. if (name == "sidebar_home") { - mCollapseButton = createButton("",sidebar_tab->mImage, + mCollapseButton = createButton("",sidebar_tab->mImage,sidebar_tab->getTabTitle(), boost::bind(&LLSideTray::onToggleCollapse, this)); } else { - LLButton* button = createButton("",sidebar_tab->mImage, + LLButton* button = createButton("",sidebar_tab->mImage,sidebar_tab->getTabTitle(), boost::bind(&LLSideTray::onTabButtonClick, this, name)); mTabButtons[name] = button; } -- cgit v1.2.3