Kaydet (Commit) 398fadca authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

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
üst 9582fd98
...@@ -255,10 +255,12 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue ...@@ -255,10 +255,12 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
} }
bAppendSeparator = false; bAppendSeparator = false;
m_pToolBar->InsertItem( nId, aTitle );
OUString aShortcut(vcl::CommandInfoProvider::Instance().GetCommandShortcut(aURL, m_xFrame)); OUString aShortcut(vcl::CommandInfoProvider::Instance().GetCommandShortcut(aURL, m_xFrame));
if (!aShortcut.isEmpty()) if (!aShortcut.isEmpty())
aTitle += " (" + aShortcut + ")"; m_pToolBar->SetQuickHelpText(nId, aTitle + " (" + aShortcut + ")");
m_pToolBar->InsertItem( nId, aTitle );
// don't setup images yet, AddonsToolbarWrapper::populateImages does that. // don't setup images yet, AddonsToolbarWrapper::populateImages does that.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment