lock: add setting to toggle new shape password chars

This commit is contained in:
end-4
2025-10-30 15:56:17 +01:00
parent f3e674684e
commit d645286744
3 changed files with 17 additions and 3 deletions
@@ -328,6 +328,7 @@ Singleton {
property bool unlockKeyring: true property bool unlockKeyring: true
property bool requirePasswordToPower: false property bool requirePasswordToPower: false
} }
property bool materialShapeChars: true
} }
property JsonObject media: JsonObject { property JsonObject media: JsonObject {
@@ -170,14 +170,18 @@ MouseArea {
} }
// We're drawing dots manually // We're drawing dots manually
color: ColorUtils.transparentize(Appearance.colors.colOnLayer1) property bool materialShapeChars: Config.options.lock.materialShapeChars
PasswordChars { color: ColorUtils.transparentize(Appearance.colors.colOnLayer1, materialShapeChars ? 1 : 0)
Loader {
active: passwordBox.materialShapeChars
anchors { anchors {
fill: parent fill: parent
leftMargin: passwordBox.padding leftMargin: passwordBox.padding
rightMargin: passwordBox.padding rightMargin: passwordBox.padding
} }
length: root.context.currentText.length sourceComponent: PasswordChars {
length: root.context.currentText.length
}
} }
} }
@@ -556,6 +556,15 @@ ContentPage {
Config.options.lock.showLockedText = checked; 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 { ContentSubsection {
title: Translation.tr("Style: Blurred") title: Translation.tr("Style: Blurred")