iOS: Report native orientation of QScreen in relation to size
Instead of hard-coding it to assume the properties of the main/device screen. Change-Id: I94c978d4334cae5be9d1094a0c315031e54e8e1f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>bb10
parent
2e2c7327dd
commit
ce6fd574b4
|
|
@ -219,7 +219,9 @@ qreal QIOSScreen::devicePixelRatio() const
|
|||
|
||||
Qt::ScreenOrientation QIOSScreen::nativeOrientation() const
|
||||
{
|
||||
return Qt::PortraitOrientation;
|
||||
// A UIScreen stays in the native orientation, regardless of rotation
|
||||
return m_uiScreen.bounds.size.width >= m_uiScreen.bounds.size.height ?
|
||||
Qt::LandscapeOrientation : Qt::PortraitOrientation;
|
||||
}
|
||||
|
||||
Qt::ScreenOrientation QIOSScreen::orientation() const
|
||||
|
|
|
|||
Loading…
Reference in New Issue