add burn-in prevention for lock screen
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user