views:

18

answers:

1

I'd like to override the default system control tint for my app to be always NSGraphiteControlTint. The following code doesn't seem to work though. Any suggestions?

NSButton *button = [window standardWindowButton:NSWindowCloseButton];
[[button cell] setControlTint:NSGraphiteControlTint];

Regards, Erik

A: 

Not all controls are going to respect the control tint. This is even more likely for controls that are rarely used by apps like the window buttons.

That code looks correct. To verify it, try it on something like a radio button or a push button.

To get a small button that looks like a gray version of the close button I think you are going to have to use a button with custom graphics or your own subclass with custom drawing.

Jon Steinmetz