From 21eb816339555c1e85f1dd0ac84bbe73b57ef838 Mon Sep 17 00:00:00 2001 From: ericwa Date: Fri, 11 Nov 2011 23:16:50 +0000 Subject: [PATCH] * Source/GSInfoPanel.m: Fix app icon button size at 48x48 and use NSImageScaleProportionallyUpOrDown. This prevents icons with large sizes (e.g. 512x512 pixel) from making the info panel really big. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34161 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ Source/GSInfoPanel.m | 7 ++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c58a28800..5bdde5dab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-11-11 Eric Wasylishen + + * Source/GSInfoPanel.m: Fix app icon button size at 48x48 and use + NSImageScaleProportionallyUpOrDown. + This prevents icons with large sizes (e.g. 512x512 pixel) from + making the info panel really big. + 2011-11-11 Eric Wasylishen * Headers/AppKit/NSImageCell.h: diff --git a/Source/GSInfoPanel.m b/Source/GSInfoPanel.m index 720cfbde8..859d5b95e 100644 --- a/Source/GSInfoPanel.m +++ b/Source/GSInfoPanel.m @@ -412,13 +412,10 @@ new_label (NSString *value) /* * Create GUI Objects */ - f = NSZeroRect; - if (icon != nil) - { - f.size = [icon size]; - } + f = NSMakeRect(0, 0, 48, 48); iconButton = AUTORELEASE([[NSButton alloc] initWithFrame: f]); + [[iconButton cell] setImageScaling: NSImageScaleProportionallyUpOrDown]; [iconButton setImage: icon]; [iconButton setBordered: NO]; [iconButton setImagePosition: NSImageOnly];