Re: NSBorderlessWindowMask - shadows not working correctly
Re: NSBorderlessWindowMask - shadows not working correctly
- Subject: Re: NSBorderlessWindowMask - shadows not working correctly
- From: email@hidden
- Date: Tue, 3 Oct 2006 17:54:22 -0700
On 2006/10/02, at 5:28, Jerry Brace wrote:
I have a subclass of NSWindow programmed for my main application
window which is using NSBorderlessWindowMask. Everything is working
great except for the correct shadow behaviour. By that I mean - a
shadow appears (setHasShadow:YES) but it doesn't change when the
app is active/inactive (it doesn't get bigger and darker when the
app is in focus like a regular NSWindow).
I have set canBecomeKeyWindow and canBecomeMainWindow to YES - but
it doesn't seem to help the matter.
I've searched through the archives many times and have not found a
solution - I've also searched CocoaDev.com - the closest solution I
found was someone suggesting to draw the shadow from scratch.
Another developer I know is also in the same situation - any help
would be great!
Yes, this is the default behavior. The reason being to discourage
developers from creating divergent UIs in the same OS.
If you want to have your own window style, subclass a normal
NSWindow, and at creation time, have the content view (custom
subclass) completely erase
the contents of the window (you'll have to get the full rect of the
window, not contents) and draw using a clear color. Then draw
anything you want as normal,
the shadow will be drawn automatically. You may also want to remove
the standard buttons (close open minimize, toolbar and title) from
the window as well.
Andre
_______________________________________________
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