• 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
Round corners of borderless NSWindow without set it transparent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Round corners of borderless NSWindow without set it transparent


  • Subject: Round corners of borderless NSWindow without set it transparent
  • From: Andrea3000 <email@hidden>
  • Date: Mon, 27 Feb 2012 14:45:25 +0100

I'm trying to round edges of a borderless NSWindow without having to mark it as transparent with setOpaque:NO.

My testbed is made only of a borderless NSWindow, its Content View and a regular NSView.
The NSView is subclassed to override drawRect method in order to round corners of the view.

Then, if I set my NSWindow non-opaque I correctly get rounded corners but the window becomes very slow expecially during resize.
Therefore I'm looking for a way to mimic QuickTime X window which is (or seems at least) a borderless window and still has rounded corners.

I've found some tutorials online that subclass NSThemeFrame in order to draw the content view with rounded corners and then use the method of NSWindow: -setBottomCornerRounded:YES.
Unfortunately this solution works only on a regular NSWindow.

I've discovered that the Content View of a borderless NSWindow is of class NSNextStepFrame and not NSThemeFrame but I'm not able to go any further.
Also, -setBottomCornerRounded:YES doesn't seem to have any effect on a borderless window.

Have you got any hint on how can I achive what I want?

Thank you very much
Regards

Andrea
_______________________________________________

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


  • Follow-Ups:
    • Re: Round corners of borderless NSWindow without set it transparent
      • From: Seth Willits <email@hidden>
  • Prev by Date: Re: Application Suite Preferences
  • Next by Date: How to support larger NSView hierarchy?
  • Previous by thread: Re: Accelerate/vDSP.h question
  • Next by thread: Re: Round corners of borderless NSWindow without set it transparent
  • Index(es):
    • Date
    • Thread