diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-10-17 12:02:32 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2020-08-19 10:36:06 +0200 |
commit | 83ac9db1a68a2fbdd2322a8b185cc24e74d34dc3 (patch) | |
tree | b481ea4c5942862c8967446609c12bee7478fa89 | |
parent | 573aa68c4114886870a0a0af1dfadf462fa2b34e (diff) |
Use ToolBox::GetImageSize
Change-Id: Ie7ae46001589584482bf5efe698b3774edace325
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100968
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 2582bcd109d9..009c4d75fbd3 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -287,22 +287,12 @@ void ToolBarManager::RefreshImages() { SolarMutexGuard g; - vcl::ImageType eImageType = vcl::ImageType::Size16; - if (m_eSymbolSize == SFX_SYMBOLS_SIZE_LARGE) - { m_pToolBar->SetToolboxButtonSize(ToolBoxButtonSize::Large); - eImageType = vcl::ImageType::Size26; - } else if (m_eSymbolSize == SFX_SYMBOLS_SIZE_32) - { - eImageType = vcl::ImageType::Size32; m_pToolBar->SetToolboxButtonSize(ToolBoxButtonSize::Size32); - } else - { m_pToolBar->SetToolboxButtonSize(ToolBoxButtonSize::Small); - } for ( auto const& it : m_aControllerMap ) { @@ -316,6 +306,7 @@ void ToolBarManager::RefreshImages() else { OUString aCommandURL = m_pToolBar->GetItemCommand( it.first ); + vcl::ImageType eImageType = m_pToolBar->GetImageSize(); Image aImage = vcl::CommandInfoProvider::GetImageForCommand(aCommandURL, m_xFrame, eImageType); // Try also to query for add-on images before giving up and use an // empty image. |