From 0c5871e1081f3177a3ec00982a58306b139fd7b4 Mon Sep 17 00:00:00 2001 From: zach Date: Mon, 6 Jul 2026 14:12:07 +0200 Subject: [PATCH] add burn-in prevention for lock screen --- Modules/Lock/LockSurface.qml | 38 +++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/Modules/Lock/LockSurface.qml b/Modules/Lock/LockSurface.qml index 1ad7885..ad16bc4 100644 --- a/Modules/Lock/LockSurface.qml +++ b/Modules/Lock/LockSurface.qml @@ -157,28 +157,38 @@ WlSessionLockSurface { Item { id: lockContent + property int positionIndex: 0 + readonly property var positions: [Qt.point(0, 0), Qt.point(4, 0), Qt.point(4, 4), Qt.point(0, 4), Qt.point(-4, 4), Qt.point(-4, 0), Qt.point(-4, -4), Qt.point(0, -4), Qt.point(4, -4),] readonly property int radius: size / 4 * Appearance.rounding.scale readonly property int size: lockIcon.implicitHeight + Appearance.padding.large * 4 anchors.centerIn: parent + anchors.horizontalCenterOffset: positions[positionIndex].x + anchors.verticalCenterOffset: positions[positionIndex].y implicitHeight: size implicitWidth: size scale: 0 - // MultiEffect { - // anchors.fill: lockBg - // autoPaddingEnabled: false - // blur: 1 - // blurEnabled: true - // blurMax: 64 - // maskEnabled: true - // maskSource: lockBg - // - // source: ShaderEffectSource { - // sourceItem: background - // sourceRect: Qt.rect(lockBg.x, lockBg.y, lockBg.width, lockBg, height) - // } - // } + Behavior on anchors.horizontalCenterOffset { + Anim { + duration: 5000 + } + } + Behavior on anchors.verticalCenterOffset { + Anim { + duration: 5000 + } + } + + Timer { + interval: 120000 + repeat: true + running: true + + onTriggered: { + lockContent.positionIndex = (lockContent.positionIndex + 1) % lockContent.positions.length; + } + } CustomRect { id: lockBg