Revision: 5877
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5877&view=rev
Author:   hofman
Date:     2009-10-14 16:18:17 +0000 (Wed, 14 Oct 2009)

Log Message:
-----------
don't scale images uses setSize:, because that's not how it works, especially 
on 10.6

Modified Paths:
--------------
    trunk/NSURL_SKExtensions.m

Modified: trunk/NSURL_SKExtensions.m
===================================================================
--- trunk/NSURL_SKExtensions.m  2009-10-14 12:39:51 UTC (rev 5876)
+++ trunk/NSURL_SKExtensions.m  2009-10-14 16:18:17 UTC (rev 5877)
@@ -110,8 +110,10 @@
     
     NSString *name = [self isFileURL] ? [self path] : [self relativeString];
     if (name) {
-        NSImage *image = [[NSWorkspace sharedWorkspace] iconForFile:name];
-        [image setSize:NSMakeSize(16, 16)];
+        NSImage *image = [[[NSImage alloc] initWithSize:NSMakeSize(16, 16)] 
autorelease];
+        [image lockFocus];
+        [[[NSWorkspace sharedWorkspace] iconForFile:name] 
drawInRect:NSMakeRect(0.0, 0.0, 16.0, 16.0) fromRect:NSZeroRect 
operation:NSCompositeCopy fraction:1.0];
+        [image unlockFocus];
         name = [[[name lastPathComponent] stringByDeletingPathExtension] 
stringByAppendingPathExtension:@"tiff"];
         
         NSFileWrapper *wrapper = [[NSFileWrapper alloc] 
initRegularFileWithContents:[image TIFFRepresentation]];


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to