lock works

This commit is contained in:
2026-03-21 16:17:49 -05:00
parent cecf6df20a
commit 27db5bd480
9 changed files with 285 additions and 16 deletions

View File

@@ -15,14 +15,23 @@ Item {
property bool locked: false
onLockedChanged: lock.locked = locked
required property string bg_path
required property LockCtx ctx
property color fieldColor: ctx.failed ? "red" : Pywal.colors.color1
IpcHandler {
target: "lockscreen"
function lock() { lock.locked = true; }
function unlock() { lock.locked = false; }
}
LockCtx {
id: ctx
lock: root.lock
onShouldUnlock: lock.locked = false
}
WlSessionLock {
@@ -31,6 +40,10 @@ Item {
locked: root.locked
onLockedChanged: {
root.locked = locked
}
WlSessionLockSurface {
color: "transparent"
@@ -49,7 +62,7 @@ Item {
RowLayout {
ClippingWrapperRectangle {
color: Pywal.colors.color1
color: root.fieldColor
implicitWidth: 200
TextInput {
text: ""
@@ -69,7 +82,7 @@ Item {
Button {
text: "unlock"
onClicked: {
ctx.unlock()
ctx.doUnlock()
}
}