Use an image view instead of a button to display the application icon. That way

icons get scaled correctly.
Patch by Philippe Roussel <p.o.roussel@free.fr>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32578 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2011-03-14 14:36:30 +00:00
parent 857e61738a
commit 32a98382fc
2 changed files with 15 additions and 11 deletions

View file

@ -1,10 +1,17 @@
2011-03-14 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSSavePanel.m (-_initWithoutGModel): Use an image view
instead of a button to display the application icon. That way
icons get scaled correctly.
Patch by Philippe Roussel <p.o.roussel@free.fr>.
2011-03-14 Nicola Pero <nicola.pero@meta-innovation.com>
* Resources/GNUmakefile
(gui-resources_RESOURCE_FILES_INSTALL_DIR): Removed.
* Source/GNUmakefile
(libgui-resources_RESOURCE_FILES_INSTALL_DIR): Removed.
2011-03-14 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSLayoutManager.m: Don't draw spelling underlines

View file

@ -181,6 +181,7 @@ setPath(NSBrowser *browser, NSString *path)
NSBox *bar;
NSButton *button;
NSImage *image;
NSImageView *imageView;
NSRect r;
id lastKeyView;
@ -342,17 +343,13 @@ setPath(NSBrowser *browser, NSString *path)
[_browser setTarget: _okButton];
r = NSMakeRect (8, 261, 48, 48);
button = [[NSButton alloc] initWithFrame: r];
image = [[NSApplication sharedApplication] applicationIconImage];
[button setImage: image];
[button setBordered: NO];
[button setEnabled: NO];
[[button cell] setImageDimsWhenDisabled: NO];
[button setImagePosition: NSImageOnly];
[button setAutoresizingMask: NSViewMinYMargin];
[button setTag: NSFileHandlingPanelImageButton];
[_topView addSubview: button];
[button release];
imageView = [[NSImageView alloc] initWithFrame: r];
[imageView setAutoresizingMask: NSViewMinYMargin];
[imageView setImage:image];
[imageView setTag: NSFileHandlingPanelImageButton];
[_topView addSubview: imageView];
[imageView release];
r = NSMakeRect (67, 276, 200, 14);
_titleField = [[NSTextField alloc] initWithFrame: r];