Re: window shadow and setAlphaValue bug?
Re: window shadow and setAlphaValue bug?
- Subject: Re: window shadow and setAlphaValue bug?
- From: Ricky Sharp <email@hidden>
- Date: Sun, 19 Nov 2006 19:05:56 -0600
On Nov 19, 2006, at 3:11 PM, Ivan Kourtev wrote:
Why is it that if a window has NO shadow and the window's alpha
value is set (via - [NSWindow setAlphaValue:]) to a value different
from 1.0, a window shadow is now rendered to the screen? I tried
creating the window programmatically or in IB, I tried
invalidateShadow after the setAlphaValue calls, nothing works.
What's even more confusing to me is that - [NSWindow hasShadow]
continues to return NO after the shadow has appeared.
I searched all window documentation and didn't find any mention of
this being documented behavior. Is anyone aware of why this is
happening and any possible workarounds (setting alpha back to 1.0
helps to eliminate the shadow but I really need windows with
different alpha values).
What kind of window are you creating? And what OS are you running?
I was not able to reproduce this on 10.4.8. From my NSWindow
subclass' designated initializer:
if ((self = [super initWithContentRect:theContentRect
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered
defer:NO]) != nil)
{
[self setBackgroundColor:[NSColor blackColor]];
[self setHidesOnDeactivate:NO];
[self setReleasedWhenClosed:NO];
[self setMovableByWindowBackground:NO];
[self setHasShadow:NO];
[self useOptimizedDrawing:YES];
[self setOpaque:NO];
[self setAlphaValue:0.1];
}
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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