CPWindow centering

This commit is contained in:
Francisco Ryan Tolmasky I
2009-08-20 19:15:31 -07:00
committed by Tom Robinson
parent d2df0919a5
commit 35fa76064c
+2 -2
View File
@@ -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)];
}