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
This commit is contained in:
Stefan Csomor 2010-02-09 09:35:22 +00:00
parent d4d799e9ea
commit 76fe30bbad

View 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];
}