mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-03 07:36:16 +00:00
Merge remote branch 'klaaspieter/fix-751-cpwindow-center'
This commit is contained in:
@@ -1368,7 +1368,15 @@ CPTexturedBackgroundWindowMask
|
||||
var size = [self frame].size,
|
||||
containerSize = [CPPlatform isBrowser] ? [_platformWindow contentBounds].size : [[self screen] visibleFrame].size;
|
||||
|
||||
[self setFrameOrigin:CGPointMake((containerSize.width - size.width) / 2.0, (containerSize.height - size.height) / 2.0)];
|
||||
var origin = CGPointMake((containerSize.width - size.width) / 2.0, (containerSize.height - size.height) / 2.0);
|
||||
|
||||
if (origin.x < 0.0)
|
||||
origin.x = 0.0;
|
||||
|
||||
if (origin.y < 0.0)
|
||||
origin.y = 0.0;
|
||||
|
||||
[self setFrameOrigin:origin];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user