* 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
This commit is contained in:
Eric Wasylishen 2011-11-11 23:16:50 +00:00
parent 60674d5076
commit 1cffdb27c7
2 changed files with 9 additions and 5 deletions

View file

@ -1,3 +1,10 @@
2011-11-11 Eric Wasylishen <ewasylishen@gmail.com>
* 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 <ewasylishen@gmail.com>
* Headers/AppKit/NSImageCell.h:

View file

@ -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];