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>bb10
parent
2d4e96352a
commit
0d9a50380c
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue