Set tooltip for vertical tabs

This commit is contained in:
miKaぴょん
2015-10-05 17:50:35 +02:00
parent 1c40bcf63d
commit fa07fcf5a7

View File

@@ -843,10 +843,6 @@ void LLTabContainer::addTabPanel(LLPanel* child,
} }
else else
{ {
std::string tooltip = trimmed_label;
tooltip += "\nAlt-Left arrow for previous tab";
tooltip += "\nAlt-Right arrow for next tab";
btn = new LLButton(std::string(child->getName()) + " tab", btn = new LLButton(std::string(child->getName()) + " tab",
btn_rect, btn_rect,
LLStringUtil::null, LLStringUtil::null, LLStringUtil::null, LLStringUtil::null, LLStringUtil::null, LLStringUtil::null,
@@ -854,7 +850,6 @@ void LLTabContainer::addTabPanel(LLPanel* child,
font, font,
trimmed_label, trimmed_label ); trimmed_label, trimmed_label );
btn->setVisible( FALSE ); btn->setVisible( FALSE );
btn->setToolTip( tooltip );
btn->setScaleImage(TRUE); btn->setScaleImage(TRUE);
btn->setImages(tab_img, tab_selected_img); btn->setImages(tab_img, tab_selected_img);
@@ -877,6 +872,11 @@ void LLTabContainer::addTabPanel(LLPanel* child,
btn->setFollowsBottom(); btn->setFollowsBottom();
} }
} }
std::string tooltip = trimmed_label;
// FIXME: Tooltip can not be translated when hardcoded.
tooltip += "\nAlt-Left arrow for previous tab";
tooltip += "\nAlt-Right arrow for next tab";
btn->setToolTip( tooltip );
} }
LLTabTuple* tuple = new LLTabTuple( this, child, btn, textbox ); LLTabTuple* tuple = new LLTabTuple( this, child, btn, textbox );