diff --git a/macosx/FileBrowserCell.h b/macosx/FileBrowserCell.h index 05de38854..3744ed744 100644 --- a/macosx/FileBrowserCell.h +++ b/macosx/FileBrowserCell.h @@ -26,6 +26,8 @@ @interface FileBrowserCell : NSBrowserCell { + NSImage * fFolderImage; + float fPercent; NSMutableDictionary * fTitleAttributes, * fStatusAttributes; diff --git a/macosx/FileBrowserCell.m b/macosx/FileBrowserCell.m index 842ded530..c2e76fef0 100644 --- a/macosx/FileBrowserCell.m +++ b/macosx/FileBrowserCell.m @@ -49,10 +49,21 @@ - (void) setImage: (NSImage *) image { if (!image) - image = [[[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy] autorelease]; + { + if (!fFolderImage) + { + fFolderImage = [[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy]; + [fFolderImage setFlipped: YES]; + [fFolderImage setScalesWhenResized: YES]; + } + image = fFolderImage; + } + else + { + [image setFlipped: YES]; + [image setScalesWhenResized: YES]; + } - [image setFlipped: YES]; - [image setScalesWhenResized: YES]; [super setImage: image]; }