• 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: How to force "plain" shadow on NSWindow that has some transparent regions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to force "plain" shadow on NSWindow that has some transparent regions


  • Subject: Re: How to force "plain" shadow on NSWindow that has some transparent regions
  • From: Jesse Grosjean <email@hidden>
  • Date: Wed, 13 Feb 2008 08:51:13 -0500

I found a solution, but it requires a private API.

	[window setValue:[NSNumber numberWithInt:10] forKey:@"shadowStyle"];

Ugly because of private API, but a lot easier then setting up transparent child windows that don't have shadows as suggested elsewhere.

Jesse

I have a NSWindow that's set to [window setOpaque:NO].

Most of it draws like a normal window, no transparency, but a section in
the middle does have a 50% transparent region that displays some text. The
problem is that this text content is computed as part of the windows
shadow. This makes the text hard to read and also causes odd halo drawing
bugs when the window is resized.


I'm looking for a way to tell the window to just compute normal "square"
shadows, and not take any interior transparent regions into consideration
when computing this shadow. Does anyone know how to do this? Basically I
want the exact same effect that Terminal.app has in leopard when dealing
with transparent regions.


Does anyone know how that's done?

Thanks,
Jesse


_______________________________________________

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


  • Prev by Date: Generic NSView Support for NSDragDestination
  • Next by Date: fetching the window pointer of other applications (processes)
  • Previous by thread: Generic NSView Support for NSDragDestination
  • Next by thread: fetching the window pointer of other applications (processes)
  • Index(es):
    • Date
    • Thread