Re: Simple question? NSButton/checkbox color
Re: Simple question? NSButton/checkbox color
- Subject: Re: Simple question? NSButton/checkbox color
- From: "Gary L. Wade" <email@hidden>
- Date: Fri, 06 Jun 2014 07:10:20 -0700
If I were colorizing such a button, I'd try overriding drawRect: and have the superclass draw in my own focused image, desaturate anything that's fully opaque (check boxes aren't necessarily rectangular nor "completely contained"), and then apply the desired color with a less-than-1.0 (25% maybe) alpha. After that I'd draw my focused image within the context that was given at the time my drawRect: was called. However, you would need to be careful to be sure whatever background color is present is preserved and also not tinted, and any shadows are correctly handled, and you'd need to handle any intermediate drawing states (including the actual check mark, whatever it may be) and retina issues that may come up.
--
Gary L. Wade (Sent from my iPhone)
http://www.garywade.com/
_______________________________________________
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