1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 22:15:38 -05:00

Some lockscreen restructure

This commit is contained in:
bbedward
2025-10-09 11:30:02 -04:00
parent 5e2371c2cb
commit e32622ac48
3 changed files with 44 additions and 78 deletions

View File

@@ -4,33 +4,26 @@ import Quickshell
import Quickshell.Wayland
import qs.Common
WlSessionLockSurface {
Rectangle {
id: root
required property WlSessionLock lock
required property string sharedPasswordBuffer
signal passwordChanged(string newPassword)
readonly property bool locked: lock && !lock.locked
function unlock(): void {
lock.locked = false
}
signal unlockRequested()
color: "transparent"
Loader {
LockScreenContent {
anchors.fill: parent
sourceComponent: LockScreenContent {
demoMode: false
passwordBuffer: root.sharedPasswordBuffer
screenName: root.screen?.name ?? ""
onUnlockRequested: root.unlock()
onPasswordBufferChanged: {
if (root.sharedPasswordBuffer !== passwordBuffer) {
root.passwordChanged(passwordBuffer)
}
demoMode: false
passwordBuffer: root.sharedPasswordBuffer
screenName: ""
onUnlockRequested: root.unlockRequested()
onPasswordBufferChanged: {
if (root.sharedPasswordBuffer !== passwordBuffer) {
root.passwordChanged(passwordBuffer)
}
}
}