forked from Shinonome/dots-hyprland
lock: add setting to toggle new shape password chars
This commit is contained in:
@@ -328,6 +328,7 @@ Singleton {
|
||||
property bool unlockKeyring: true
|
||||
property bool requirePasswordToPower: false
|
||||
}
|
||||
property bool materialShapeChars: true
|
||||
}
|
||||
|
||||
property JsonObject media: JsonObject {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user