summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2012-12-07 15:28:13 +0100
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-27 23:55:49 +0100
commit0d9a50380c2d3ecc33f632f9f0e158c3a8cd2099 (patch)
tree9aab8604f78485198c60dd64d4f7bbcf0ca478cf /src/plugins/platforms
parent2d4e96352a0f52351e0fa69273b064a66d460c04 (diff)
iOS: when in fullscreen, autoresize the view when the device rotates
Tell the view that backs QWindow to autoresize itself when the superview (view of the root view controller) changes size. This will typically happen when the device changes orientation. Change-Id: Ib7c4dff9112d57f60012d3f0837677e09088bcaf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index 7f03e0d46a..2b97695a10 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -234,9 +234,11 @@ void QIOSWindow::setWindowState(Qt::WindowState state)
case Qt::WindowMaximized:
case Qt::WindowFullScreen:
m_view.frame = toCGRect(QRect(QPoint(0, 0), window()->screen()->availableSize()));
+ m_view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
break;
default:
m_view.frame = toCGRect(geometry());
+ m_view.autoresizingMask = UIViewAutoresizingNone;
break;
}
}