show show password button also if empty text

like happened in KPasswordWidget, show the show password
button also when there is no text, otherwise is impossible
to know what will be typed, a dot or the actual letter
BUG: 378277
This commit is contained in:
Marco Martin 2017-06-09 13:13:58 +02:00
parent e65d7b98be
commit 1aea7bbd5e

View File

@ -95,7 +95,7 @@ QtControls.TextField {
source: __effectiveRevealPasswordButtonShown ? (textField.echoMode === TextInput.Normal ? "hint" : "visibility") : ""
height: Math.max(textField.height * 0.8, units.iconSizes.small)
width: height
opacity: (textField.length > 0 && __effectiveRevealPasswordButtonShown && textField.enabled) ? 1 : 0
opacity: (__effectiveRevealPasswordButtonShown && textField.enabled) ? 1 : 0
visible: opacity > 0
Behavior on opacity {
NumberAnimation {