diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2018-12-11 13:54:34 -0600 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2018-12-11 13:54:34 -0600 |
| commit | 3712da7e3f805b64d2e9ffd1e054d0bdf0743a3b (patch) | |
| tree | 1a8353ef2f50013f198d2ed7d61c27cf1097f0cf /components | |
| parent | 0f05127262cf662ab549deae426c9deebf77967e (diff) | |
| parent | fa0c691666c24153d49dcb9ff23afce4e3381c4c (diff) | |
| download | monzero-gui-3712da7e3f805b64d2e9ffd1e054d0bdf0743a3b.tar.gz monzero-gui-3712da7e3f805b64d2e9ffd1e054d0bdf0743a3b.tar.xz monzero-gui-3712da7e3f805b64d2e9ffd1e054d0bdf0743a3b.zip | |
Merge pull request #1789
fa0c691 PasswordDialog: add ability to toggle text echo mode (mmbyday)
Diffstat (limited to 'components')
| -rw-r--r-- | components/PasswordDialog.qml | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/components/PasswordDialog.qml b/components/PasswordDialog.qml index 230db37f..d0f442e4 100644 --- a/components/PasswordDialog.qml +++ b/components/PasswordDialog.qml @@ -40,6 +40,7 @@ Item { visible: false z: parent.z + 2 + property bool isHidden: true property alias password: passwordInput.text property string walletName property string errorText @@ -136,12 +137,33 @@ Item { color: "black" Image { - width: 12 - height: 16 - source: "../images/lockIcon.png" + width: 26 * scaleRatio + height: 26 * scaleRatio + opacity: 0.7 + fillMode: Image.PreserveAspectFit + source: isHidden ? "../images/eyeShow.png" : "../images/eyeHide.png" anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right anchors.rightMargin: 20 + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + hoverEnabled: true + onClicked: { + passwordInput.echoMode = isHidden ? TextInput.Normal : TextInput.Password; + isHidden = !isHidden; + } + onEntered: { + parent.opacity = 0.9 + parent.width = 28 * scaleRatio + parent.height = 28 * scaleRatio + } + onExited: { + parent.opacity = 0.7 + parent.width = 26 * scaleRatio + parent.height = 26 * scaleRatio + } + } } } |
