From 5058c4b7cbbeace3136dac6ead31d4aacfb0a877 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 27 Feb 2020 15:33:37 +0200 Subject: Use contentOrientation to better handle screen rotations Use the contentOrientation hint to tell Window when we have rotated the screen. This will solve issues with popups and combo boxes. Change-Id: I19fab5f7425525acde35d93dc1b7156eb04ba812 Fixes: QTBUG-78257 Reviewed-by: Kari Oikarinen --- qml/Main.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qml/Main.qml b/qml/Main.qml index 99c6e4d..7764363 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -39,6 +39,9 @@ Window { color: viewSettings.backgroundColor property alias appFont: viewSettings.appFont + contentOrientation: Screen.desktopAvailableHeight > Screen.desktopAvailableWidth ? + (globalSettings.rotationSelected ? Qt.InvertedLandscapeOrientation : Qt.LandscapeOrientation) : + (globalSettings.rotationSelected ? Qt.InvertedPortraitOrientation : Qt.PortraitOrientation) ViewSettings { id: viewSettings -- cgit v1.2.3