PDA

View Full Version : Custom Button Image Sizes?




Noisemaker
Nov 5, 2010, 01:32 PM
What is the image size needed to add a custom image to a round rect button for Mac?

Are there default back, forward, and refresh buttons similar to what iOS has?



kainjow
Nov 5, 2010, 11:07 PM
What is the image size needed to add a custom image to a round rect button for Mac?
That button normally doesn't have an image associated with it, but if you're going to add one, it looks like 14px would be the max height. Buttons don't have limits on their images though. Use whatever looks "right".

Are there default back, forward, and refresh buttons similar to what iOS has?

Go here (http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/Reference/Reference.html), then scroll down to the "Image Template Constants" section near the bottom, and you'll find a list of images that are built-in. They can be used with NSImage's imageNamed: method.

Noisemaker
Nov 11, 2010, 12:15 AM
That button normally doesn't have an image associated with it, but if you're going to add one, it looks like 14px would be the max height. Buttons don't have limits on their images though. Use whatever looks "right".



Go here (http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/Reference/Reference.html), then scroll down to the "Image Template Constants" section near the bottom, and you'll find a list of images that are built-in. They can be used with NSImage's imageNamed: method.

Thanks for that link! I didn't realize there were so many button images available right off the bat. It definitely makes UI easier.

What is the "proper" button to use for those? Can I apply them via IB, or just through code?