iOS: handle content orientation feedback from application
Change-Id: I2bfb4ee4840086dcd3ec85c2ee7e8769e76d2700 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>bb10
parent
fa731cddd1
commit
575d28a6fd
|
|
@ -86,6 +86,7 @@ public:
|
|||
void updateGeometry(const QRect &rect);
|
||||
|
||||
void setWindowState(Qt::WindowState state);
|
||||
void handleContentOrientationChange(Qt::ScreenOrientation orientation);
|
||||
|
||||
GLuint framebufferObject(const QIOSContext &context) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
#include "qioscontext.h"
|
||||
#include "qiosscreen.h"
|
||||
#include "qiosapplicationdelegate.h"
|
||||
#include "qiosorientationlistener.h"
|
||||
|
||||
#import <QuartzCore/CAEAGLLayer.h>
|
||||
|
||||
|
|
@ -248,6 +249,14 @@ void QIOSWindow::setWindowState(Qt::WindowState state)
|
|||
}
|
||||
}
|
||||
|
||||
void QIOSWindow::handleContentOrientationChange(Qt::ScreenOrientation orientation)
|
||||
{
|
||||
// Keep the status bar in sync with content orientation. This will ensure
|
||||
// that the task bar (and associated gestures) are aligned correctly:
|
||||
UIDeviceOrientation uiOrientation = convertToUIOrientation(orientation);
|
||||
[[UIApplication sharedApplication] setStatusBarOrientation:uiOrientation animated:NO];
|
||||
}
|
||||
|
||||
GLuint QIOSWindow::framebufferObject(const QIOSContext &context) const
|
||||
{
|
||||
static GLuint framebuffer = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue