Am 14.03.2011 09:48, schrieb Philippe Roussel:
Hi,

The image shown in NSSavePanel has a size of 48x48 pixels. The
application image could be of a different size, resize it.

Maybe a copy of applicationIconImage should be made before setting the
image size ?

Philippe

Index: Source/NSSavePanel.m
===================================================================
--- Source/NSSavePanel.m        (révision 32563)
+++ Source/NSSavePanel.m        (copie de travail)
@@ -344,6 +344,7 @@
    r = NSMakeRect (8, 261, 48, 48);
    button = [[NSButton alloc] initWithFrame: r];
    image = [[NSApplication sharedApplication] applicationIconImage];
+  [image setSize:NSMakeSize(48,48)];
    [button setImage: image];
    [button setBordered: NO];
    [button setEnabled: NO];

Yes, if we go that way we will have to use a copy of the image here. What I don't like about image copies is that we wont get noticed if the original image changes. Why are we using an NSButton here in the first place? Wouldn't an NSImageView that scales the image work as well?

_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to