Raffael
Raffael

Reputation: 1139

Draw shadow of layer-backed NSView beyond bounds

I'd like to get a custom NSShadow on a borderless NSWindow, and since I'm also applying some animations on the window, I've set up the window's content view to be layer-backed.

When applying the NSShadow on the contentView, the shadow is clipped at the view's border:

enter image description here

One possibility would be to reduce contentView's rect (NSInsetRect), but then the NSWindow's resizing borders wouldn't match the window's appearance!

Is there any chance to draw the layer's shadow beyond its borders?

EDIT: The shown screenshot already has a -10 inset rect!

Upvotes: 6

Views: 432

Answers (0)

Related Questions