From 2e33fb9f81d80c1096f0fb49873d5d57827e4602 Mon Sep 17 00:00:00 2001 From: Noelia <97019400+noeliaSD@users.noreply.github.com> Date: Wed, 9 Mar 2022 13:17:58 +0100 Subject: [PATCH] feat(StatusPasswordStrengthIndicator): Add new Strength type `None` Add new Strength type None and its corresponding state. --- .../Controls/StatusPasswordStrengthIndicator.qml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/StatusQ/Controls/StatusPasswordStrengthIndicator.qml b/src/StatusQ/Controls/StatusPasswordStrengthIndicator.qml index ffb23a12..b15769f1 100644 --- a/src/StatusQ/Controls/StatusPasswordStrengthIndicator.qml +++ b/src/StatusQ/Controls/StatusPasswordStrengthIndicator.qml @@ -15,16 +15,21 @@ StatusProgressBar { property string labelGreat: "Great" enum Strength { - VeryWeak, // 0 - Weak, // 1 - SoSo, // 2 - Good, // 3 - Great // 4 + None, // 0 + VeryWeak, // 1 + Weak, // 2 + SoSo, // 3 + Good, // 4 + Great // 5 } // Behavior: states: [ // Strength states definition: + State { + when: control.strength === StatusPasswordStrengthIndicator.Strength.None + PropertyChanges { target: control; text: ""} + }, State { when: control.strength === StatusPasswordStrengthIndicator.Strength.VeryWeak PropertyChanges { target: control; fillColor : Theme.palette.dangerColor1}