Reputation: 81
In some applications like Sparrow Mail are set two different application icons. The default icon used in dock, in icon view e cover flow. Then a second smaller for list view, column view and title bar. How do you set the icon smaller? In file.plist there is only this.
Thanks.
Upvotes: 2
Views: 627
Reputation: 22958
Xcode includes the Icon Composer.app application which allows you to create .icns (Icon Suite) files which support multiple resolutions like shown in the following image:
As you can see in the image above, the Get Info panel’s “proxy” icon (in the titlebar) is using the small 16 x 16 icon, while the lower icon is using one of the larger sizes. If you are used to the single-size-only ways of UIImage
, how an NSImage
works in OS X may be confusing at first. In iOS, a UIImage
represents a single bitmap image, and is basically a wrapper around a CoreGraphics CGImageRef
. An NSImage
in OS X works at a higher level, and as such, is quite different than a UIImage
. An NSImage
contains one or more specifically-sized NSImageRep
s, which are more analogous to a UIImage
. In the screenshot you provided, both the window title bar button’s image and the NSImageView
’s image are set to the same instance of an NSImage
. When that image is asked to draw itself, however, the image is choosing 2 different NSImageRep
s based on the size requested. For more information on how this works, see Cocoa Drawing Guide: Image Basics - How an Image Representation is Chosen.
If you’re using the all-in-one Xcode.app app bundle, launch Xcode and choose Xcode > Open Developer Tool > Icon Composer. If you’re using the older style of the Xcode tools, with multiple folders, it’ll be at <Developer Tools>/Applications/Utilities/Icon Composer.app
.
Upvotes: 2