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
+ }
+ }
}
}
diff --git a/images/eyeHide.png b/images/eyeHide.png
new file mode 100644
index 00000000..63a441f3
Binary files /dev/null and b/images/eyeHide.png differ
diff --git a/images/eyeShow.png b/images/eyeShow.png
new file mode 100644
index 00000000..d4ad64a4
Binary files /dev/null and b/images/eyeShow.png differ
diff --git a/qml.qrc b/qml.qrc
index b5689645..74f100ca 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -226,5 +226,7 @@
images/settings_navbar_side_active.png
images/settings_local.png
components/WarningBox.qml
+ images/eyeHide.png
+ images/eyeShow.png