From f14527d4e14286bc271c9fcc1d736ebc83125f11 Mon Sep 17 00:00:00 2001 From: Kugi Eusebio Date: Thu, 15 Apr 2021 16:33:52 +0800 Subject: [PATCH] Enable greeter rotation on landscape devices This will enable rotation of the lock screen on devices with landscape as their primary orientation. Rotation is limited on the two landscape orientations since the greeter does not yet have responsive design. --- qml/Shell.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qml/Shell.qml b/qml/Shell.qml index ebc7cf020..abcbdb57c 100644 --- a/qml/Shell.qml +++ b/qml/Shell.qml @@ -79,7 +79,7 @@ StyledItem { readonly property bool orientationChangesEnabled: panel.indicators.fullyClosed && stage.orientationChangesEnabled - && (!greeter || !greeter.animating) + && !greeter.animating readonly property bool showingGreeter: greeter && greeter.shown @@ -90,6 +90,9 @@ StyledItem { if (startingUp) { // Ensure we don't rotate during start up return Qt.PrimaryOrientation; + } else if (showingGreeter + && (shell.orientations.primary == Qt.LandscapeOrientation || shell.orientations.primary == Qt.InvertedLandscapeOrientation)) { + return Qt.LandscapeOrientation | Qt.InvertedLandscapeOrientation; } else if (showingGreeter || notifications.topmostIsFullscreen) { return Qt.PrimaryOrientation; } else {