# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1336398974 0 # Node ID c836c6c33d8e4dd60d42b22509ed2cd6c71eb47f # Parent daa59fc8d6e54670f720f5de23b73517f988f649 Create an internal _dw_icon_load() which does not resize the image on Mac. Found that I was using dw_icon_load() internally in dw_window_set_bitmap() which had the effect of resizing images that shouldn't have been. diff -r daa59fc8d6e5 -r c836c6c33d8e mac/dw.m --- a/mac/dw.m Mon May 07 13:29:51 2012 +0000 +++ b/mac/dw.m Mon May 07 13:56:14 2012 +0000 @@ -6838,6 +6838,16 @@ } } +/* Internal version that does not resize the image */ +HICN _dw_icon_load(unsigned long resid) +{ + NSBundle *bundle = [NSBundle mainBundle]; + NSString *respath = [bundle resourcePath]; + NSString *filepath = [respath stringByAppendingFormat:@"/%u.png", resid]; + NSImage *image = [[NSImage alloc] initWithContentsOfFile:filepath]; + return image; +} + /* * Obtains an icon from a module (or header in GTK). * Parameters: @@ -6848,10 +6858,7 @@ */ HICN API dw_icon_load(unsigned long module, unsigned long resid) { - NSBundle *bundle = [NSBundle mainBundle]; - NSString *respath = [bundle resourcePath]; - NSString *filepath = [respath stringByAppendingFormat:@"/%u.png", resid]; - NSImage *image = [[NSImage alloc] initWithContentsOfFile:filepath]; + NSImage *image = _dw_icon_load(resid); _icon_resize(image); return image; } @@ -8901,7 +8908,7 @@ } else if(resid > 0 && resid < 65536) { - bitmap = dw_icon_load(0, resid); + bitmap = _dw_icon_load(resid); } if(bitmap)