Question

I'm working on some updates to my first Mac app and I'm trying to get my window's toolbar buttons to look like the toolbar buttons on EVERY standard Mac app. However, for the life of me, I can't find a button type or a barbutton type that gets me what I'm looking for. Am I missing something?

Here is an image showing several Mac apps (Preview, Finder, and Safari) with toolbars at the top which have very-slighty rounded corner buttons which also have a slight gradient on them, etc.

enter image description here

However, in my .xib I've got a toolbar and I've dropped every kind of button I can find on the thing and nothing looks like the standard Mac button.

enter image description here

The first button looks pretty close, but it's clearly not the same color. Am I missing something?

Was it helpful?

Solution

@Matt Ball is right - you can use NSSegmentedControls, even for single one-time click buttons. Just set the number of segments to 1, and set the mode to "Select None".

One of my shipping apps uses this technique, see below: Toolbar with NSSegmentedControls

All of the controls there are NSSegmentedControl, including the single one.

Update: there are a few standard button icons which are meant for toolbars. The NSImage Class Reference has a list.

In the above screenshot, only two of the buttons are using built-in images: NSLeftFacingTriangleTemplate, and NSRightFacingTriangleTemplate. The others I drew myself.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top