mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
remove lock screen delays
This commit is contained in:
@@ -42,7 +42,7 @@ Item {
|
|||||||
source: SessionData.wallpaperPath || ""
|
source: SessionData.wallpaperPath || ""
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
smooth: true
|
smooth: true
|
||||||
asynchronous: true
|
asynchronous: false
|
||||||
cache: true
|
cache: true
|
||||||
visible: source !== ""
|
visible: source !== ""
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
|
|||||||
@@ -12,37 +12,14 @@ WlSessionLockSurface {
|
|||||||
|
|
||||||
signal passwordChanged(string newPassword)
|
signal passwordChanged(string newPassword)
|
||||||
|
|
||||||
property bool thisLocked: false
|
readonly property bool locked: lock && !lock.locked
|
||||||
readonly property bool locked: thisLocked && lock && !lock.unlocked
|
|
||||||
|
|
||||||
function unlock(): void {
|
function unlock(): void {
|
||||||
console.log("LockSurface.unlock() called")
|
lock.locked = false
|
||||||
if (lock) {
|
|
||||||
lock.unlocked = true
|
|
||||||
animDelay.start()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
thisLocked = true
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onDestruction: {
|
|
||||||
animDelay.stop()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: animDelay
|
|
||||||
interval: 1500 // Longer delay for success feedback
|
|
||||||
onTriggered: {
|
|
||||||
if (root.lock) {
|
|
||||||
root.lock.locked = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PowerConfirmModal {
|
PowerConfirmModal {
|
||||||
id: powerConfirmModal
|
id: powerConfirmModal
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user