• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: smaller icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smaller icon


  • Subject: Re: smaller icon
  • From: Dustin Voss <email@hidden>
  • Date: Sat, 28 Feb 2004 17:40:18 -0800

On 28 Feb, 2004, at 3:49 PM, Glenn Andreas wrote:

On 27 Feb, 2004, at 1:07 PM, Eric Forget wrote:

But will this be just scaled down or the actual 16x16 representation
provided in the .icns file?

If there is a 16x16 representation it will be used.

I don't believe this is true, at least not when using NSWorkspace, and I'd be surprised if it worked with NSFileWrapper.

NSWorkspace simply scales down the largest icon available. See <http://lists.apple.com/archives/cocoa-dev/2001/Nov/06/fileicon.txt>.

If you want the actual 16x16 icon, you'll probably have to use Carbon's Icon Services.

Hm, I've used NSWorkspace & images and it works fine (this is a snippet from something that sets the small icon in an outline view for a file):

id aCell = [tableColumn dataCell];
NSImage *image = NULL;
if ([item objectForKey: IDEKit_ProjEntryPath] && [item uiKind] == IDEKit_kUIFileEntry) {
image = [[NSWorkspace sharedWorkspace] iconForFile: [item objectForKey: IDEKit_ProjEntryPath]];
} else {
image = [[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')];
}
[image setSize: NSMakeSize(16,16)];
[aCell setImage: image];

Are you sure the 16x16 image the same as the 16x16 icon in the suite, or could it be the 32x32 or 128x128 icon scaled down to 16x16?

I can say that I got a different 16x16 icon using NSWorkspace than I did by using Icon Services to draw the icon into a QD offscreen world and converting that to an NSImage, but this was in Jaguar, so maybe they fixed that.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: smaller icon
      • From: Glenn Andreas <email@hidden>
References: 
 >Re: smaller icon (From: Eric Forget <email@hidden>)
 >Re: smaller icon (From: Dustin Voss <email@hidden>)
 >Re: smaller icon (From: Glenn Andreas <email@hidden>)

  • Prev by Date: Re: custom view subclass won't connect to custom controller class
  • Next by Date: Re: System PreferencePanes
  • Previous by thread: Re: smaller icon
  • Next by thread: Re: smaller icon
  • Index(es):
    • Date
    • Thread