mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-04 01:43:40 +00:00
Merge branch 'WindowSheet' of https://github.com/Dogild/cappuccino into pr-1918
This commit is contained in:
@@ -2757,14 +2757,21 @@ CPTexturedBackgroundWindowMask
|
||||
}
|
||||
|
||||
// The sheet starts hidden just above the top of a clip rect
|
||||
// TODO : Make properly for the -1 in endY
|
||||
var sheetFrame = [sheet frame],
|
||||
sheetShadowFrame = sheet._hasShadow ? [sheet._shadowView frame] : sheetFrame,
|
||||
frame = [self frame],
|
||||
originX = frame.origin.x + FLOOR((frame.size.width - sheetFrame.size.width) / 2),
|
||||
startFrame = CGRectMake(originX, -sheetShadowFrame.size.height, sheetFrame.size.width, sheetFrame.size.height),
|
||||
endY = [_windowView bodyOffset] - [[self contentView] frame].origin.y,
|
||||
endY = -1 + [_windowView bodyOffset] - [[self contentView] frame].origin.y,
|
||||
endFrame = CGRectMake(originX, endY, sheetFrame.size.width, sheetFrame.size.height);
|
||||
|
||||
if (_toolbar && [_windowView showsToolbar] && [self isFullPlatformWindow])
|
||||
{
|
||||
endY += [[_toolbar _toolbarView] frameSize].height;
|
||||
endFrame = CGRectMake(originX, endY, sheetFrame.size.width, sheetFrame.size.height);
|
||||
}
|
||||
|
||||
// Move the sheet offscreen before ordering front so it doesn't appear briefly
|
||||
[sheet setFrameOrigin:CGPointMake(0, -13000)];
|
||||
|
||||
|
||||
@@ -742,7 +742,9 @@ _CPWindowViewResizeSlop = 3;
|
||||
|
||||
- (BOOL)showsToolbar
|
||||
{
|
||||
return YES;
|
||||
var styleMaskWindow = [[self window] styleMask];
|
||||
|
||||
return styleMaskWindow & CPBorderlessWindowMask || styleMaskWindow & CPTitledWindowMask || styleMaskWindow & CPHUDBackgroundWindowMask || styleMaskWindow & CPBorderlessBridgeWindowMask;
|
||||
}
|
||||
|
||||
- (CGSize)toolbarOffset
|
||||
|
||||
Reference in New Issue
Block a user