mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-06 10:53:42 +00:00
Merge branch 'master' into desktop
This commit is contained in:
@@ -1017,6 +1017,8 @@ var STICKY_TIME_INTERVAL = 500,
|
||||
[_moreBelowView setFrameSize:[_CPMenuWindowMoreBelowImage size]];
|
||||
|
||||
[contentView addSubview:_moreBelowView];
|
||||
|
||||
[self setShadowStyle:CPWindowShadowStyleMenu];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
@@ -178,6 +178,11 @@ CPWindowDidResignMainNotification = @"CPWindowDidResignMainNotification";
|
||||
CPWindowDidMoveNotification = @"CPWindowDidMoveNotification";
|
||||
|
||||
|
||||
CPWindowShadowStyleStandard = 0;
|
||||
CPWindowShadowStyleMenu = 1;
|
||||
CPWindowShadowStylePanel = 2;
|
||||
|
||||
|
||||
var SHADOW_MARGIN_LEFT = 20.0,
|
||||
SHADOW_MARGIN_RIGHT = 19.0,
|
||||
SHADOW_MARGIN_TOP = 10.0,
|
||||
@@ -247,6 +252,7 @@ var CPWindowSaveImage = nil,
|
||||
BOOL _isAnimating;
|
||||
BOOL _hasShadow;
|
||||
BOOL _isMovableByWindowBackground;
|
||||
unsigned _shadowStyle;
|
||||
|
||||
BOOL _supportsMultipleDocuments;
|
||||
BOOL _isDocumentEdited;
|
||||
@@ -983,6 +989,12 @@ CPTexturedBackgroundWindowMask
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setShadowStyle:(unsigned)aStyle
|
||||
{
|
||||
_shadowStyle = aStyle;
|
||||
[[self platformWindow] setShadowStyle:_shadowStyle];
|
||||
}
|
||||
|
||||
/*!
|
||||
Sets the delegate for the window. Passing \c nil will just remove the window's current delegate.
|
||||
@param aDelegate an object to respond to the various delegate methods of CPWindow
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#import "Platform.h"
|
||||
#import "../CoreGraphics/CGGeometry.h"
|
||||
|
||||
|
||||
var PrimaryPlatformWindow = NULL;
|
||||
|
||||
@implementation CPPlatformWindow : CPObject
|
||||
@@ -13,6 +12,7 @@ var PrimaryPlatformWindow = NULL;
|
||||
|
||||
CPInteger _level;
|
||||
BOOL _hasShadow;
|
||||
unsigned _shadowStyle;
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
DOMWindow _DOMWindow;
|
||||
@@ -169,6 +169,16 @@ var PrimaryPlatformWindow = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)setShadowStyle:(int)aStyle
|
||||
{
|
||||
_shadowStyle = aStyle;
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
if (_DOMWindow && _DOMWindow.cpSetShadowStyle)
|
||||
_shadowStyle.cpSetShadowStyle(aStyle);
|
||||
#endif
|
||||
}
|
||||
|
||||
- (BOOL)supportsFullPlatformWindows
|
||||
{
|
||||
return [CPPlatform isBrowser];
|
||||
|
||||
@@ -334,8 +334,10 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop];
|
||||
|
||||
if (![CPPlatform isBrowser])
|
||||
{
|
||||
_DOMWindow.cpSetFrame(_contentRect);
|
||||
_DOMWindow.cpSetLevel(_level);
|
||||
_DOMWindow.cpSetHasShadow(_hasShadow);
|
||||
_DOMWindow.cpSetShadowStyle(_shadowStyle);
|
||||
}
|
||||
|
||||
[self registerDOMWindow];
|
||||
|
||||
Reference in New Issue
Block a user