|
|
|
@ -40,6 +40,7 @@ Item {
|
|
|
|
|
visible: false
|
|
|
|
|
z: parent.z + 2
|
|
|
|
|
|
|
|
|
|
property bool isHidden: true
|
|
|
|
|
property alias password: passwordInput1.text
|
|
|
|
|
|
|
|
|
|
// same signals as Dialog has
|
|
|
|
@ -67,6 +68,12 @@ Item {
|
|
|
|
|
root.visible = false;
|
|
|
|
|
closeCallback();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toggleIsHidden() {
|
|
|
|
|
passwordInput1.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
|
|
|
|
|
passwordInput2.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
|
|
|
|
|
isHidden = !isHidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: implement without hardcoding sizes
|
|
|
|
|
width: 480
|
|
|
|
@ -119,6 +126,8 @@ Item {
|
|
|
|
|
leftPadding: 10
|
|
|
|
|
topPadding: 10
|
|
|
|
|
color: MoneroComponents.Style.defaultFontColor
|
|
|
|
|
selectionColor: MoneroComponents.Style.dimmedFontColor
|
|
|
|
|
selectedTextColor: MoneroComponents.Style.defaultFontColor
|
|
|
|
|
KeyNavigation.tab: passwordInput2
|
|
|
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
@ -128,12 +137,32 @@ 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: {
|
|
|
|
|
toggleIsHidden()
|
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -178,6 +207,8 @@ Item {
|
|
|
|
|
leftPadding: 10
|
|
|
|
|
topPadding: 10
|
|
|
|
|
color: MoneroComponents.Style.defaultFontColor
|
|
|
|
|
selectionColor: MoneroComponents.Style.dimmedFontColor
|
|
|
|
|
selectedTextColor: MoneroComponents.Style.defaultFontColor
|
|
|
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
|
radius: 2
|
|
|
|
@ -186,12 +217,32 @@ 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: {
|
|
|
|
|
toggleIsHidden()
|
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|