Re: HIG-compliant image highlight
Re: HIG-compliant image highlight
- Subject: Re: HIG-compliant image highlight
- From: "Konstantin Anoshkin" <email@hidden>
- Date: Sat, 24 Dec 2005 12:49:08 +0300
>
>> "John C. Randolph" <email@hidden> 12/24/05 1:57 AM >>>
>
On Dec 23, 2005, at 6:21 AM, Konstantin Anoshkin wrote:
>
> Is there "official" way to darken an NSImage ala NSButtonCell?
>
> Currently I am doing it like this:
>
> [[[NSColor blackColor] colorWithAlphaComponent: 0.46f] set];
>
> NSRectFillUsingOperation(theRect, NSCompositeSourceAtop);
>
>
>
> The alpha value of 0.46 seems to be very close, but I am sure
>
> NSButtonCell highlights its image in a different way. Can anybody
>
> give me a clue?
>
NSButtonCell uses alternative images if they're provided, so the aqua
>
buttons you see in their highlighted state are drawn with hand-
>
tweaked images.
>
-jcr
I may have worded the question poorly. I don't mean standard aqua
buttons made in Photoshop. I mean images which you can assign to
NSButton instances in Interface Builder. AppKit is able to darken your
images automagically without you having to provide an alternative image.
Hmmm. I think I'll just have to subclass NSButtonCell.
Konstantin.
------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden