[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - include/vcl vcl/source
Michael Meeks
michael.meeks at suse.com
Mon Jul 8 01:58:00 PDT 2013
include/vcl/toolbox.hxx | 1 +
vcl/source/window/toolbox2.cxx | 13 +++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 0784de21830d34a47ece9aae2dfd1db99f04d301
Author: Michael Meeks <michael.meeks at suse.com>
Date: Fri Jul 5 16:25:49 2013 +0100
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
Reviewed-on: https://gerrit.libreoffice.org/4744
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 702f819..f27c721 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -567,6 +567,7 @@ public:
// if an index is found the corresponding item id is filled in (else 0)
long GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const;
+ static const Size& GetDefaultImageSize(bool bLarge);
const Size& GetDefaultImageSize() const;
void ChangeHighlight( sal_uInt16 nPos );
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 6634361..053def3 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -973,7 +973,7 @@ ToolBoxButtonSize ToolBox::GetToolboxButtonSize() const
// -----------------------------------------------------------------------
-const Size& ToolBox::GetDefaultImageSize() const
+const Size& ToolBox::GetDefaultImageSize(bool bLarge)
{
static Size aSmallButtonSize( TB_SMALLIMAGESIZE, TB_SMALLIMAGESIZE );
@@ -986,6 +986,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;
@@ -995,12 +998,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 );
}
// -----------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list