summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qioswindow.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-03-20 11:23:31 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-03-27 10:24:17 +0000
commit013afc77f0a191ee60d0d2d6b84d35435fdc9c07 (patch)
tree8552b45a74f05ca90b44b24f499d8ec2cb81d178 /src/plugins/platforms/ios/qioswindow.mm
parenta73cead0e0ffe674d0c873a726d2535ba60d9614 (diff)
Add Qt::WindowFlag to signal that maximizing should cover full screen geometry
Normally when maximizing a window it will cover the available geometry of the screen, as represented by QScreen::availableGeometry(), which typically excludes status/menu bars and application launchers. On some platforms it may still be possible to place windows in the areas of the screen that are outside of the available geometry, but this will result in the window being partially covered by (possibly) transparent system UIs. The new flag allows the user to specify that when maximizing the window it should try to cover as much as possible of the screen geometry (in contrast to going full screen, which would typically hide any system UIs). For iOS this is a common use-case, as the status bar is transparent, and the user-interface guidelines for iOS7 and up recommend taking advantage of the full screen space, while keeping any user-interaction elements still inside the available geometry of the screen. Change-Id: I86d7fc937916d9cae245f7a3f9ae46abd92cdd29 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios/qioswindow.mm')
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index 95a4c28246..777a3c12c5 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -244,7 +244,8 @@ void QIOSWindow::setWindowState(Qt::WindowState state)
applyGeometry(m_normalGeometry);
break;
case Qt::WindowMaximized:
- applyGeometry(screen()->availableGeometry());
+ applyGeometry(window()->flags() & Qt::MaximizeUsingFullscreenGeometryHint ?
+ screen()->geometry() : screen()->availableGeometry());
break;
case Qt::WindowFullScreen:
applyGeometry(screen()->geometry());