Re: Drag Tabs, Custom Colors
Re: Drag Tabs, Custom Colors
- Subject: Re: Drag Tabs, Custom Colors
- From: Rainer Brockerhoff <email@hidden>
- Date: Wed, 12 Nov 2008 11:36:56 -0200
At 17:21 -0800 11/11/08, email@hidden wrote:
>From: "Kyle Sluder" <email@hidden>
>References: <email@hidden>
>In-Reply-To: <email@hidden>
>Date: Tue, 11 Nov 2008 19:23:58 -0500
>Message-ID: <email@hidden>
>
>> 2. Is there any "easy" way to customize the colors used by Cocoa's controls
>> to use neutral grays, like Apple's pro apps?
>
>No.
Well, you can use the standard way to override some global preference just for your app:
int main(int argc, char *argv[]) {
[[NSUserDefaults standardUserDefaults] setVolatileDomain:
[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:NSGraphiteControlTint]
forKey:@"AppleAquaColorVariant"]
forName:NSRegistrationDomain];
return NSApplicationMain(argc, (const char **) argv);
}
For this specific key, it must be done before calling NSApplicationMain().
It works, but this is sort of a gray (hehe) area. The key "AppleAquaColorVariant" is undocumented. It's not too likely to change, but if it changes, your control color will return to normal with no other harm done - no crashing etc. Use at your own risk.
HTH,
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden