diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-07-05 16:25:49 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-07-05 17:11:45 +0100 |
commit | 5ab07df58bcc33423fabba2d0363cdde6a51f566 (patch) | |
tree | 92183960d0face35e52db85dd3418945c1fa527e /vcl/source/window/toolbox2.cxx | |
parent | 05f0859afba779ce28d24e3195d8266d616259d1 (diff) |
fdo#66524 - export a means of detecting preferred icon size for toolbars.
Also fix human / tango / and other icon theme item sizing.
Change-Id: I7039f8f671834237a7ec9b2e4b5227e9c47e7143
Diffstat (limited to 'vcl/source/window/toolbox2.cxx')
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 412fe331897a..05afd1a33bd3 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -982,7 +982,7 @@ ToolBoxButtonSize ToolBox::GetToolboxButtonSize() const // ----------------------------------------------------------------------- -const Size& ToolBox::GetDefaultImageSize() const +const Size& ToolBox::GetDefaultImageSize(bool bLarge) { static Size aSmallButtonSize( TB_SMALLIMAGESIZE, TB_SMALLIMAGESIZE ); @@ -995,6 +995,9 @@ const Size& ToolBox::GetDefaultImageSize() const s_nSymbolsStyle = nSymbolsStyle; switch ( nSymbolsStyle ) { + case STYLE_SYMBOLS_TANGO: + case STYLE_SYMBOLS_TANGO_TESTING: + case STYLE_SYMBOLS_HUMAN: case STYLE_SYMBOLS_INDUSTRIAL: aLargeButtonSize = Size( TB_LARGEIMAGESIZE_INDUSTRIAL, TB_LARGEIMAGESIZE_INDUSTRIAL ); break; @@ -1004,12 +1007,18 @@ const Size& ToolBox::GetDefaultImageSize() const case STYLE_SYMBOLS_OXYGEN: aLargeButtonSize = Size( TB_LARGEIMAGESIZE_OXYGEN, TB_LARGEIMAGESIZE_OXYGEN ); break; + case STYLE_SYMBOLS_DEFAULT: // galaxy + case STYLE_SYMBOLS_HICONTRAST: default: aLargeButtonSize = Size( TB_LARGEIMAGESIZE, TB_LARGEIMAGESIZE ); } } + return bLarge ? aLargeButtonSize : aSmallButtonSize; +} - return GetToolboxButtonSize() == TOOLBOX_BUTTONSIZE_LARGE ? aLargeButtonSize : aSmallButtonSize; +const Size& ToolBox::GetDefaultImageSize() const +{ + return GetDefaultImageSize( GetToolboxButtonSize() == TOOLBOX_BUTTONSIZE_LARGE ); } // ----------------------------------------------------------------------- |