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>
bb10
Richard Moe Gustavsen 2013-05-23 14:24:50 +02:00 committed by The Qt Project
parent 7f1ad7c7c9
commit 875480ed99
1 changed files with 1 additions and 1 deletions

View File

@ -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