Re: Title bar highlighting behavior
Re: Title bar highlighting behavior
- Subject: Re: Title bar highlighting behavior
- From: Graham Cox <email@hidden>
- Date: Sat, 15 Aug 2009 10:39:19 +1000
On 15/08/2009, at 9:40 AM, bryscomat wrote:
In a window of my app, I have an NSView acting as a toolbar. It is
colored with a gradient so that it looks like a textured toolbar and
blends in nicely with the title bar. However, it does not fade out
when window loses key. I have implemented the delegate method
windowDidResignKey: and am attempting to modify it that way. Does
anybody have pointers on how to go about this?
In that method, just call -setNeedsDisplay:YES on your view.
In the view's -drawRect: method, detect whether the view's window is
currently key, and draw the appropriate background.
To detect whether key, use:
if([self window] == [NSApp keyWindow])
{
...
}
--Graham
_______________________________________________
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