From e8d8a9c96919242d980c7db6e6d7ceb55cbed4af Mon Sep 17 00:00:00 2001 From: filip Date: Thu, 25 Jun 2026 15:54:26 +0200 Subject: [PATCH 1/2] Add lock input feedback --- shell/plugins/lock/LockView.qml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/shell/plugins/lock/LockView.qml b/shell/plugins/lock/LockView.qml index 8853039b04..ca095c4443 100644 --- a/shell/plugins/lock/LockView.qml +++ b/shell/plugins/lock/LockView.qml @@ -16,6 +16,7 @@ Item { property bool loadBackground: true property string passwordText: "" property bool syncingPasswordText: false + property real inputBorderPulseWidth: 0 readonly property string placeholderText: "Enter Password" readonly property int fieldWidth: 381 @@ -59,7 +60,14 @@ Item { syncingPasswordText = false } - onPasswordTextChanged: syncPasswordText() + function pulseInputField() { + inputBorderPulse.restart() + } + + onPasswordTextChanged: { + syncPasswordText() + if (passwordText.length > 0) pulseInputField() + } onInputEnabledChanged: { if (inputEnabled) Qt.callLater(forcePasswordFocus) } @@ -107,10 +115,20 @@ Item { height: root.fieldHeight anchors.centerIn: parent color: Color.lock.background - borderSpec: root.inputBorderSpec + borderSpec: root.inputBorderPulseWidth > 0 && !root.errorState + ? Border.surfaceSpec("lock", "border-active", Color.lock.borderActive, root.outlineThickness + root.inputBorderPulseWidth, "border-alpha") + : root.inputBorderSpec radius: Style.cornerRadius clip: true + SequentialAnimation { + id: inputBorderPulse + running: false + + PropertyAnimation { target: root; property: "inputBorderPulseWidth"; to: 1.1; duration: 40; easing.type: Easing.OutCubic } + PropertyAnimation { target: root; property: "inputBorderPulseWidth"; to: 0; duration: 240; easing.type: Easing.OutCubic } + } + TextInput { id: passwordInput anchors.fill: parent From aed0bb640729f24e0c60c9465a26acac6af4a5dc Mon Sep 17 00:00:00 2001 From: filip Date: Mon, 29 Jun 2026 12:11:37 +0200 Subject: [PATCH 2/2] Respect themed lock border widths during pulse --- shell/plugins/lock/LockView.qml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/shell/plugins/lock/LockView.qml b/shell/plugins/lock/LockView.qml index ca095c4443..d8752d850a 100644 --- a/shell/plugins/lock/LockView.qml +++ b/shell/plugins/lock/LockView.qml @@ -30,6 +30,16 @@ Item { readonly property var inputBorderSpec: errorState ? Border.surfaceSpec("lock", "border-error", Color.lock.borderError, root.outlineThickness, "border-alpha") : Border.surfaceSpec("lock", "border-active", Color.lock.borderActive, root.outlineThickness, "border-alpha") + readonly property var pulsedInputBorderSpec: ({ + color: root.inputBorderSpec.color, + gradient: root.inputBorderSpec.gradient, + widths: { + top: root.inputBorderSpec.widths.top + root.inputBorderPulseWidth, + right: root.inputBorderSpec.widths.right + root.inputBorderPulseWidth, + bottom: root.inputBorderSpec.widths.bottom + root.inputBorderPulseWidth, + left: root.inputBorderSpec.widths.left + root.inputBorderPulseWidth, + }, + }) signal submitPassword(string password) signal passwordTextEdited(string password) @@ -116,7 +126,7 @@ Item { anchors.centerIn: parent color: Color.lock.background borderSpec: root.inputBorderPulseWidth > 0 && !root.errorState - ? Border.surfaceSpec("lock", "border-active", Color.lock.borderActive, root.outlineThickness + root.inputBorderPulseWidth, "border-alpha") + ? root.pulsedInputBorderSpec : root.inputBorderSpec radius: Style.cornerRadius clip: true