From 875480ed99f4c2fa4a65f7c4fc1c3823024519f0 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 23 May 2013 14:24:50 +0200 Subject: iOS: bugfix function portraitToPrimary() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/plugins/platforms/ios/qiosglobal.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3