Commit 4d3af04f authored by Filip Matijević's avatar Filip Matijević

[rotation] prevent LockScreen from rotating

parent 01e8119c
......@@ -78,7 +78,8 @@ Page {
orientation: Lipstick.compositor.screenOrientation
onOrientationChanged: {
glacierRotation.rotateRotationParent(orientation)
if (!lockscreenVisible())
glacierRotation.rotateRotationParent(orientation)
}
onParentChanged: {
......@@ -90,6 +91,17 @@ Page {
Lipstick.compositor.screenOrientation = nativeOrientation
}
Connections {
target: LipstickSettings
onLockscreenVisibleChanged: {
if (lockscreenVisible()) {
glacierRotation.rotateRotationParent(nativeOrientation)
} else {
glacierRotation.rotateRotationParent(desktop.orientation)
}
}
}
function lockscreenVisible() {
return LipstickSettings.lockscreenVisible === true
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment