gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Application icon size in the open and save dialogs


From: Fred Kiefer
Subject: Re: Application icon size in the open and save dialogs
Date: Mon, 14 Mar 2011 13:24:57 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]