diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2013-05-23 14:24:50 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-28 10:17:56 +0200 |
commit | 875480ed99f4c2fa4a65f7c4fc1c3823024519f0 (patch) | |
tree | 7b1f93afc1624d5cd675378d32f5cbf46b2225f7 | |
parent | 7f1ad7c7c95ba37c172fa5819b2ba4f78bb3ceb6 (diff) |
iOS: bugfix function portraitToPrimary()
The old implementation was wrong since it did not use the
screen's height (which was already in primary orientation) to
calculate what the new y value of the target rect (which was in
portrait) should be.
Change-Id: Ie5b2241119e244d099e06d85f69953c1d64979aa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-rw-r--r-- | src/plugins/platforms/ios/qiosglobal.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosglobal.mm b/src/plugins/platforms/ios/qiosglobal.mm index 9abb4ba851..537d63ae77 100644 --- a/src/plugins/platforms/ios/qiosglobal.mm +++ b/src/plugins/platforms/ios/qiosglobal.mm @@ -142,7 +142,7 @@ QRect fromPortraitToPrimary(const QRect &rect, QPlatformScreen *screen) // aligned with UIScreen into whatever is the current orientation of QScreen. QRect geometry = screen->geometry(); return geometry.width() < geometry.height() ? rect - : QRect(rect.y(), geometry.width() - rect.width() - rect.x(), rect.height(), rect.width()); + : QRect(rect.y(), geometry.height() - rect.width() - rect.x(), rect.height(), rect.width()); } QT_END_NAMESPACE |