Kaydet (Commit) 5ab07df5 authored tarafından Michael Meeks's avatar Michael Meeks

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
üst 05f0859a
......@@ -571,6 +571,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 );
......
......@@ -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 );
}
// -----------------------------------------------------------------------
......
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