aboutsummaryrefslogtreecommitdiff
path: root/components/PasswordDialog.qml
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2018-03-22 03:51:57 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-29 23:04:03 +0100
commit72a7fac4675e109080a734ec9e9ad3987b87237d (patch)
tree738ecd440b655226e2d29f5411b5890d3b7b38f3 /components/PasswordDialog.qml
parent916c7acbb7f0bb658acd3ea050ea4b04581374e2 (diff)
downloadmonzero-gui-72a7fac4675e109080a734ec9e9ad3987b87237d.tar.gz
monzero-gui-72a7fac4675e109080a734ec9e9ad3987b87237d.tar.xz
monzero-gui-72a7fac4675e109080a734ec9e9ad3987b87237d.zip
Restyled password dialog
Diffstat (limited to 'components/PasswordDialog.qml')
-rw-r--r--components/PasswordDialog.qml131
1 files changed, 68 insertions, 63 deletions
diff --git a/components/PasswordDialog.qml b/components/PasswordDialog.qml
index e8563a73..80d2a677 100644
--- a/components/PasswordDialog.qml
+++ b/components/PasswordDialog.qml
@@ -26,8 +26,8 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import QtQuick 2.0
-import QtQuick.Controls 1.4
+import QtQuick 2.7
+import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4
@@ -38,13 +38,6 @@ import "../components" as MoneroComponents
Item {
id: root
visible: false
- Rectangle {
- id: bg
- z: parent.z + 1
- anchors.fill: parent
- color: "white"
- opacity: 0.9
- }
property alias password: passwordInput.text
property string walletName
@@ -61,7 +54,7 @@ Item {
titleBar.enabled = false
show()
root.visible = true;
- passwordInput.focus = true
+ passwordInput.forceActiveFocus();
passwordInput.text = ""
}
@@ -82,41 +75,52 @@ Item {
ColumnLayout {
id: column
//anchors {fill: parent; margins: 16 }
+ Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
+ Layout.maximumWidth: 400 * scaleRatio
Label {
- text: root.walletName.length > 0 ? qsTr("Please enter wallet password for:<br>") + root.walletName : qsTr("Please enter wallet password")
- Layout.alignment: Qt.AlignHCenter
- Layout.columnSpan: 2
+ text: qsTr("Please enter wallet password")
+ anchors.left: parent.left
Layout.fillWidth: true
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 18 * scaleRatio
- font.family: "Arial"
- color: "#555555"
+
+ font.pixelSize: 16 * scaleRatio
+ font.family: Style.fontLight
+
+ color: Style.defaultFontColor
}
TextField {
id : passwordInput
+ Layout.topMargin: 8
Layout.fillWidth: true
- Layout.alignment: Qt.AlignHCenter
- Layout.maximumWidth: 400 * scaleRatio
- horizontalAlignment: TextInput.AlignHCenter
+ anchors.left: parent.left
+ horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
- font.family: "Arial"
- font.pixelSize: 32 * scaleRatio
+ font.family: Style.fontLight
+ font.pixelSize: 24 * scaleRatio
echoMode: TextInput.Password
KeyNavigation.tab: okButton
+ bottomPadding: 10
+ leftPadding: 10
+ topPadding: 10
+ color: "white"
+ background: Rectangle {
+ radius: 2
+ border.color: Qt.rgba(255, 255, 255, 0.35)
+ border.width: 1
+ color: "black"
- style: TextFieldStyle {
- renderType: Text.NativeRendering
- textColor: "#35B05A"
- passwordCharacter: "•"
- // no background
- background: Rectangle {
- radius: 0
- border.width: 0
+ Image {
+ width: 12
+ height: 16
+ source: "../images/lockIcon.png"
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ anchors.rightMargin: 20
}
}
+
Keys.onReturnPressed: {
root.close()
root.accepted()
@@ -127,44 +131,45 @@ Item {
root.rejected()
}
-
-
}
- // underline
- Rectangle {
- height: 1
- color: "#DBDBDB"
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignHCenter
- anchors.bottomMargin: 3
- Layout.maximumWidth: passwordInput.width
- }
- }
- // Ok/Cancel buttons
- RowLayout {
- id: buttons
- spacing: 60 * scaleRatio
- Layout.alignment: Qt.AlignHCenter
-
- MoneroComponents.StandardButton {
- id: cancelButton
- text: qsTr("Cancel") + translationManager.emptyString
- KeyNavigation.tab: passwordInput
- onClicked: {
- root.close()
- root.rejected()
+ // Ok/Cancel buttons
+ RowLayout {
+ id: buttons
+ spacing: 16 * scaleRatio
+ Layout.topMargin: 16
+ Layout.alignment: Qt.AlignRight
+
+ MoneroComponents.StandardButton {
+ id: cancelButton
+ small: true
+ text: qsTr("Cancel") + translationManager.emptyString
+ KeyNavigation.tab: passwordInput
+ onClicked: {
+ root.close()
+ root.rejected()
+ }
}
- }
- MoneroComponents.StandardButton {
- id: okButton
- text: qsTr("Continue")
- KeyNavigation.tab: cancelButton
- onClicked: {
- root.close()
- root.accepted()
+
+ MoneroComponents.StandardButton {
+ id: okButton
+ small: true
+ text: qsTr("Continue")
+ KeyNavigation.tab: cancelButton
+ onClicked: {
+ root.close()
+ root.accepted()
+ }
}
}
+
}
}
+ Rectangle {
+ id: bg
+
+ anchors.fill: parent
+ color: "black"
+ opacity: 0.8
+ }
}