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
parent
7f1ad7c7c9
commit
875480ed99
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue