Subclass NSButtonCell and assign it to your button CELL in IB (not the BUTTON directly -> one level deeper). In the subclass implement the following and modifiy size, font and color as you like:
- (NSAttributedString*)attributedTitleForString:(NSString*)string
{
// Colors
NSColor *disabledColor = [NSColor grayColor];
NSColor *enabledColor = [NSColor redColor];
// Font
NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
[style setAlignment:NSLeftTextAlignment];
NSFont *font = [NSFont systemFontOfSize:11];
// Enabled
NSDictionary *enabledAttrsDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
enabledColor, NSForegroundColorAttributeName,
style, NSParagraphStyleAttributeName,
font, NSFontAttributeName,
nil];
NSAttributedString* enabledTitle = [[NSAttributedString alloc]initWithString:string attributes:enabledAttrsDictionary];
// Disabled
NSDictionary *disabledAttrsDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
disabledColor, NSForegroundColorAttributeName,
style, NSParagraphStyleAttributeName,
font, NSFontAttributeName, nil];
NSAttributedString* disabledTitle = [[NSAttributedString alloc]initWithString:string attributes:disabledAttrsDictionary];
if (![self isEnabled])
return disabledTitle;
else
return enabledTitle;
}
EDIT: Only works if setWantsLayers is false