CPWindow centering

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