From b4571199256ce4d2b3e6f1fdb4b53a8e7a77cc9f Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Sun, 25 Oct 2009 23:11:00 -0700 Subject: [PATCH] Added shadow drawing styles. Reviewed by me. --- AppKit/CPMenu.j | 1 + AppKit/CPWindow/CPWindow.j | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/AppKit/CPMenu.j b/AppKit/CPMenu.j index a9cdd64bb..ad0e2dad7 100644 --- a/AppKit/CPMenu.j +++ b/AppKit/CPMenu.j @@ -1006,6 +1006,7 @@ var STICKY_TIME_INTERVAL = 500, { [self setLevel:CPPopUpMenuWindowLevel]; [self setHasShadow:YES]; + [self setShadowStyle:CPMenuWindowShadowStyle]; [self setAcceptsMouseMovedEvents:YES]; _unconstrainedFrame = CGRectMakeZero(); diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index ab5c48ba3..ef3eaa277 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -1004,6 +1004,7 @@ CPTexturedBackgroundWindowMask - (void)setShadowStyle:(unsigned)aStyle { _shadowStyle = aStyle; + [[self platformWindow] setShadowStyle:_shadowStyle]; } @@ -2380,6 +2381,12 @@ function _CPWindowFullPlatformWindowSessionMake(aWindowView, aContentRect, hasSh return { windowView:aWindowView, contentRect:aContentRect, hasShadow:hasShadow, level:aLevel }; } +CPStandardWindowShadowStyle = 0; +CPMenuWindowShadowStyle = 1; +CPPanelWindowShadowStyle = 2; +CPCustomWindowShadowStyle = 3; + + @import "_CPWindowView.j" @import "_CPStandardWindowView.j" @import "_CPDocModalWindowView.j"