From: Stefan Csomor Date: Tue, 9 Feb 2010 09:35:22 +0000 (+0000) Subject: support fullscreen display (translucent status) in all 4 orientations X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/76fe30bbad011977db3b8d8021be2d96805c02e6?ds=inline support fullscreen display (translucent status) in all 4 orientations git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/iphone/nonownedwnd.mm b/src/osx/iphone/nonownedwnd.mm index ebf89f10b5..75b87eb70e 100644 --- a/src/osx/iphone/nonownedwnd.mm +++ b/src/osx/iphone/nonownedwnd.mm @@ -364,6 +364,7 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) if ( now->GetWindowStyle() == wxDEFAULT_FRAME_STYLE && [[UIApplication sharedApplication] statusBarStyle] == UIStatusBarStyleBlackTranslucent) { CGRect appframe = [[UIScreen mainScreen] applicationFrame]; + CGRect bounds = [[UIScreen mainScreen] bounds]; if ( CGRectEqualToRect(appframe, frame) ) { if ( appframe.origin.y != 0 ) @@ -372,12 +373,20 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) frame.origin.y -= offset; frame.size.height += offset; } - else + else if ( appframe.origin.x != 0 ) { double offset = appframe.origin.x; frame.origin.x -= offset; frame.size.width += offset; } + else if ( appframe.size.height < bounds.size.height ) + { + frame.size.height = bounds.size.height; + } + else if ( appframe.size.width < bounds.size.width ) + { + frame.size.width = bounds.size.width; + } [self.view setFrame:frame]; }