diff options
Diffstat (limited to 'sfx2/source/sidebar/SidebarToolBox.cxx')
-rw-r--r-- | sfx2/source/sidebar/SidebarToolBox.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index 986cd33a11cb..29c82ff3f18c 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -69,7 +69,7 @@ SidebarToolBox::SidebarToolBox (vcl::Window* pParentWindow) SvtMiscOptions aMiscOptions; aMiscOptions.AddListenerLink(LINK(this, SidebarToolBox, ChangedIconSizeHandler)); - sal_uInt16 nSize = aMiscOptions.GetSidebarIconSize(); + sal_uInt16 nSize = GetIconSize(); if (nSize <= TOOLBOX_BUTTONSIZE_LARGE) eSize = static_cast<ToolBoxButtonSize>(nSize); @@ -117,6 +117,12 @@ void SidebarToolBox::dispose() ToolBox::dispose(); } +sal_uInt16 SidebarToolBox::GetIconSize() const +{ + SvtMiscOptions aMiscOptions; + return aMiscOptions.GetSidebarIconSize(); +} + void SidebarToolBox::InsertItem(const OUString& rCommand, const css::uno::Reference<css::frame::XFrame>& rFrame, ToolBoxItemBits nBits, const Size& rRequestedSize, sal_uInt16 nPos) @@ -264,8 +270,7 @@ IMPL_LINK_NOARG_TYPED(SidebarToolBox, ChangedIconSizeHandler, LinkParamNone*, vo ToolBoxButtonSize eSize = TOOLBOX_BUTTONSIZE_SMALL; - SvtMiscOptions aMiscOptions; - sal_uInt16 nSize = aMiscOptions.GetSidebarIconSize(); + sal_uInt16 nSize = GetIconSize(); if(nSize <= TOOLBOX_BUTTONSIZE_LARGE) eSize = static_cast<ToolBoxButtonSize>(nSize); @@ -297,6 +302,7 @@ IMPL_LINK_NOARG_TYPED(SidebarToolBox, ChangedIconSizeHandler, LinkParamNone*, vo } } + Resize(); queue_resize(); } |