summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-03-01 18:09:23 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-03-01 18:11:58 +0100
commit398fadca9a82917ed865e328ba454d8015803b66 (patch)
tree64af366f6dc50e36453173972dbb12c1ca715a52
parent9582fd9807854c5ed69d272ecd064d2393ff5ed3 (diff)
tdf#98277 Display shortcut only in tooltip, not in toolbutton name
When toolbar buttons have no icon, the text is displayed instead. In this case the shortcut should not be displayed (only in the tooltip). Change-Id: I42ac855c8f9bbbad5114b77a29927003b8ca095e
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index a7391d17f11c..0154bddb5f81 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -255,10 +255,12 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
}
bAppendSeparator = false;
+
+ m_pToolBar->InsertItem( nId, aTitle );
+
OUString aShortcut(vcl::CommandInfoProvider::Instance().GetCommandShortcut(aURL, m_xFrame));
if (!aShortcut.isEmpty())
- aTitle += " (" + aShortcut + ")";
- m_pToolBar->InsertItem( nId, aTitle );
+ m_pToolBar->SetQuickHelpText(nId, aTitle + " (" + aShortcut + ")");
// don't setup images yet, AddonsToolbarWrapper::populateImages does that.