mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-04 09:53:41 +00:00
CPWindow centering
This commit is contained in:
committed by
Tom Robinson
parent
d2df0919a5
commit
35fa76064c
@@ -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