diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2006-02-09 13:26:01 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2006-02-09 13:26:01 +0000 |
commit | 03b899170f51ac534ed59ae1645f75bd68593725 (patch) | |
tree | 956781de0aecc20b1e473687fec871882e3e9ba7 /sfx2/source/toolbox | |
parent | 6d7fca879b50551b30312e765ac42ca36ddd3fb1 (diff) |
INTEGRATION: CWS iconswitching2 (1.54.10); FILE MERGED
2006/01/17 07:31:15 kendy 1.54.10.1: #i15208#
Resize the new toolbar icons according to the icon set size.
Diffstat (limited to 'sfx2/source/toolbox')
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index b525497671..6543296ad2 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -4,9 +4,9 @@ * * $RCSfile: tbxitem.cxx,v $ * - * $Revision: 1.55 $ + * $Revision: 1.56 $ * - * last change: $Author: kz $ $Date: 2006-02-01 13:00:10 $ + * last change: $Author: rt $ $Date: 2006-02-09 14:26:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1750,7 +1750,15 @@ void SfxAppToolBoxControl_Impl::SetImage( const String &rURL ) if ( !aImage ) aImage = !!aMenuImage ? aMenuImage : SvFileInformationManager::GetImage( INetURLObject( aURL ), bBig, bHC ); - GetToolBox().SetItemImage( GetId(), aImage ); + Size aBigSize( GetToolBox().GetDefaultImageSize() ); + if ( bBig && aImage.GetSizePixel() != aBigSize ) + { + BitmapEx aScaleBmpEx( aImage.GetBitmapEx() ); + aScaleBmpEx.Scale( aBigSize, BMP_SCALE_INTERPOLATE ); + GetToolBox().SetItemImage( GetId(), Image( aScaleBmpEx ) ); + } + else + GetToolBox().SetItemImage( GetId(), aImage ); aLastURL = aURL; } |