From d64528674417074368066f89d63ccf37aaf61105 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Thu, 30 Oct 2025 15:56:17 +0100 Subject: [PATCH] lock: add setting to toggle new shape password chars --- dots/.config/quickshell/ii/modules/common/Config.qml | 1 + .../.config/quickshell/ii/modules/lock/LockSurface.qml | 10 +++++++--- .../quickshell/ii/modules/settings/InterfaceConfig.qml | 9 +++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index f6c183b2a..18cd92fc3 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -328,6 +328,7 @@ Singleton { property bool unlockKeyring: true property bool requirePasswordToPower: false } + property bool materialShapeChars: true } property JsonObject media: JsonObject { diff --git a/dots/.config/quickshell/ii/modules/lock/LockSurface.qml b/dots/.config/quickshell/ii/modules/lock/LockSurface.qml index 628f4d2fa..4fc147de4 100644 --- a/dots/.config/quickshell/ii/modules/lock/LockSurface.qml +++ b/dots/.config/quickshell/ii/modules/lock/LockSurface.qml @@ -170,14 +170,18 @@ MouseArea { } // We're drawing dots manually - color: ColorUtils.transparentize(Appearance.colors.colOnLayer1) - PasswordChars { + property bool materialShapeChars: Config.options.lock.materialShapeChars + color: ColorUtils.transparentize(Appearance.colors.colOnLayer1, materialShapeChars ? 1 : 0) + Loader { + active: passwordBox.materialShapeChars anchors { fill: parent leftMargin: passwordBox.padding rightMargin: passwordBox.padding } - length: root.context.currentText.length + sourceComponent: PasswordChars { + length: root.context.currentText.length + } } } diff --git a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 9dee53acc..13a909cbb 100644 --- a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -556,6 +556,15 @@ ContentPage { Config.options.lock.showLockedText = checked; } } + + ConfigSwitch { + buttonIcon: "shapes" + text: Translation.tr('Use varying shapes for password characters') + checked: Config.options.lock.materialShapeChars + onCheckedChanged: { + Config.options.lock.materialShapeChars = checked; + } + } } ContentSubsection { title: Translation.tr("Style: Blurred")