• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBorderlessWindowMask - shadows not working correctly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSBorderlessWindowMask - shadows not working correctly (From: Jerry Brace <email@hidden>)

  • Prev by Date: Re: Bezier Path Arc Problem
  • Next by Date: Re: Help: Data Modelling, NSTreeController and NSBrowser
  • Previous by thread: NSBorderlessWindowMask - shadows not working correctly
  • Next by thread: NSKeyedUnarchiver unarchiveObjectWithFile - memory not being freed but no leaks?
  • Index(es):
    • Date
    • Thread