add burn-in prevention for lock screen
This commit is contained in:
@@ -157,28 +157,38 @@ WlSessionLockSurface {
|
|||||||
Item {
|
Item {
|
||||||
id: lockContent
|
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 radius: size / 4 * Appearance.rounding.scale
|
||||||
readonly property int size: lockIcon.implicitHeight + Appearance.padding.large * 4
|
readonly property int size: lockIcon.implicitHeight + Appearance.padding.large * 4
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
anchors.horizontalCenterOffset: positions[positionIndex].x
|
||||||
|
anchors.verticalCenterOffset: positions[positionIndex].y
|
||||||
implicitHeight: size
|
implicitHeight: size
|
||||||
implicitWidth: size
|
implicitWidth: size
|
||||||
scale: 0
|
scale: 0
|
||||||
|
|
||||||
// MultiEffect {
|
Behavior on anchors.horizontalCenterOffset {
|
||||||
// anchors.fill: lockBg
|
Anim {
|
||||||
// autoPaddingEnabled: false
|
duration: 5000
|
||||||
// blur: 1
|
}
|
||||||
// blurEnabled: true
|
}
|
||||||
// blurMax: 64
|
Behavior on anchors.verticalCenterOffset {
|
||||||
// maskEnabled: true
|
Anim {
|
||||||
// maskSource: lockBg
|
duration: 5000
|
||||||
//
|
}
|
||||||
// source: ShaderEffectSource {
|
}
|
||||||
// sourceItem: background
|
|
||||||
// sourceRect: Qt.rect(lockBg.x, lockBg.y, lockBg.width, lockBg, height)
|
Timer {
|
||||||
// }
|
interval: 120000
|
||||||
// }
|
repeat: true
|
||||||
|
running: true
|
||||||
|
|
||||||
|
onTriggered: {
|
||||||
|
lockContent.positionIndex = (lockContent.positionIndex + 1) % lockContent.positions.length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CustomRect {
|
CustomRect {
|
||||||
id: lockBg
|
id: lockBg
|
||||||
|
|||||||
Reference in New Issue
Block a user