[Libreoffice-commits] core.git: framework/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Tue Mar 1 17:12:23 UTC 2016
framework/source/uielement/addonstoolbarmanager.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 398fadca9a82917ed865e328ba454d8015803b66
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Tue Mar 1 18:09:23 2016 +0100
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
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index a7391d1..0154bdd 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.
More information about the Libreoffice-commits
mailing list