]> git.saurik.com Git - wxWidgets.git/commitdiff
support fullscreen display (translucent status) in all 4 orientations
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 9 Feb 2010 09:35:22 +0000 (09:35 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 9 Feb 2010 09:35:22 +0000 (09:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/iphone/nonownedwnd.mm

index ebf89f10b533447b625acdead8b843cd200b7a95..75b87eb70e3913a9b3b7104419ee8b66e6161f80 100644 (file)
@@ -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];
         }