mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-14 12:34:29 +00:00
CPWindow centering
This commit is contained in:
1 parent
d2df0919a5
commit
35fa76064c
1 file changed
+2
-2
@@ -1186,8 +1186,8 @@ CPTexturedBackgroundWindowMask
|
||||
- (void)center
|
||||
{
|
||||
var size = [self frame].size,
|
||||
containerSize = [_platformWindow contentBounds].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)];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user