mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-10 12:54:30 +00:00
WizardPassword: clamp displayed password strength to widget max
This commit is contained in:
parent
d8f9e7360f
commit
d831395013
1 changed files with 3 additions and 1 deletions
|
@ -84,9 +84,11 @@ Item {
|
||||||
strength = 0
|
strength = 0
|
||||||
// use a slight parabola to discourage short passwords
|
// use a slight parabola to discourage short passwords
|
||||||
strength = strength ^ 1.2 / 3
|
strength = strength ^ 1.2 / 3
|
||||||
|
// mapScope does not clamp
|
||||||
|
if (strength > 100)
|
||||||
|
strength = 100
|
||||||
// privacyLevel component uses 1..13 scale
|
// privacyLevel component uses 1..13 scale
|
||||||
privacyLevel.fillLevel = Utils.mapScope(1, 100, 1, 13, strength)
|
privacyLevel.fillLevel = Utils.mapScope(1, 100, 1, 13, strength)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue