Merge branch 'WindowSheet' of https://github.com/Dogild/cappuccino into pr-1918

This commit is contained in:
Antoine Mercadal
2013-05-07 11:20:49 -07:00
2 changed files with 11 additions and 2 deletions
+8 -1
View File
@@ -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)];
+3 -1
View File
@@ -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