Redesigned NewPasswordDialog

This commit is contained in:
Sander Ferdinand 2018-03-22 05:06:11 +01:00 committed by moneromooo-monero
parent 72a7fac467
commit b38ee48e59
2 changed files with 33 additions and 50 deletions

View file

@ -42,8 +42,8 @@ Item {
id: bg id: bg
z: parent.z + 1 z: parent.z + 1
anchors.fill: parent anchors.fill: parent
color: "white" color: "black"
opacity: 0.9 opacity: 0.8
} }
property alias password: passwordInput1.text property alias password: passwordInput1.text
@ -103,8 +103,8 @@ Item {
Layout.fillWidth: true Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
font.pixelSize: 18 * scaleRatio font.pixelSize: 18 * scaleRatio
font.family: "Arial" font.family: Style.fontLight
color: "#555555" color: Style.defaultFontColor
} }
TextField { TextField {
@ -121,7 +121,7 @@ Item {
style: TextFieldStyle { style: TextFieldStyle {
renderType: Text.NativeRendering renderType: Text.NativeRendering
textColor: "#35B05A" textColor: "black"
passwordCharacter: "•" passwordCharacter: "•"
// no background // no background
background: Rectangle { background: Rectangle {
@ -135,15 +135,6 @@ Item {
} }
} }
// underline
Rectangle {
height: 1
color: "#DBDBDB"
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
anchors.bottomMargin: 3
Layout.maximumWidth: passwordInput1.width
}
// padding // padding
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
@ -160,8 +151,8 @@ Item {
Layout.fillWidth: true Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
font.pixelSize: 18 * scaleRatio font.pixelSize: 18 * scaleRatio
font.family: "Arial" font.family: Style.fontLight
color: "#555555" color: Style.defaultFontColor
} }
TextField { TextField {
@ -178,7 +169,7 @@ Item {
style: TextFieldStyle { style: TextFieldStyle {
renderType: Text.NativeRendering renderType: Text.NativeRendering
textColor: "#35B05A" textColor: "black"
passwordCharacter: "•" passwordCharacter: "•"
// no background // no background
background: Rectangle { background: Rectangle {
@ -198,15 +189,6 @@ Item {
} }
} }
// underline
Rectangle {
height: 1
color: "#DBDBDB"
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
anchors.bottomMargin: 3
Layout.maximumWidth: passwordInput1.width
}
// padding // padding
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
@ -215,30 +197,31 @@ Item {
opacity: 0 opacity: 0
color: "black" color: "black"
} }
}
// Ok/Cancel buttons
RowLayout {
id: buttons
spacing: 60 * scaleRatio
Layout.alignment: Qt.AlignHCenter
MoneroComponents.StandardButton { // Ok/Cancel buttons
id: cancelButton RowLayout {
text: qsTr("Cancel") + translationManager.emptyString id: buttons
KeyNavigation.tab: passwordInput1 spacing: 60 * scaleRatio
onClicked: { Layout.alignment: Qt.AlignHCenter
root.close()
root.rejected() MoneroComponents.StandardButton {
id: cancelButton
text: qsTr("Cancel") + translationManager.emptyString
KeyNavigation.tab: passwordInput1
onClicked: {
root.close()
root.rejected()
}
} }
} MoneroComponents.StandardButton {
MoneroComponents.StandardButton { id: okButton
id: okButton text: qsTr("Continue")
text: qsTr("Continue") KeyNavigation.tab: cancelButton
KeyNavigation.tab: cancelButton enabled: passwordInput1.text === passwordInput2.text
enabled: passwordInput1.text === passwordInput2.text onClicked: {
onClicked: { root.close()
root.close() root.accepted()
root.accepted() }
} }
} }
} }

View file

@ -92,7 +92,7 @@ Item {
TextField { TextField {
id : passwordInput id : passwordInput
Layout.topMargin: 8 Layout.topMargin: 6
Layout.fillWidth: true Layout.fillWidth: true
anchors.left: parent.left anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft