aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-08-08 10:40:28 +0200
committerJaquee <jaquee.monero@gmail.com>2017-11-03 16:57:11 +0100
commite0e69b35bd35f4e2097318a007011e758402451a (patch)
tree8b48473a864eb1e94f42a2122acc939834842fa7
parentf605793cfcd15298579b08580fb37458a2c0e001 (diff)
downloadmonzero-gui-e0e69b35bd35f4e2097318a007011e758402451a.tar.gz
monzero-gui-e0e69b35bd35f4e2097318a007011e758402451a.tar.xz
monzero-gui-e0e69b35bd35f4e2097318a007011e758402451a.zip
password dialog mobile redesign
-rw-r--r--components/PasswordDialog.qml50
1 files changed, 24 insertions, 26 deletions
diff --git a/components/PasswordDialog.qml b/components/PasswordDialog.qml
index 62e3a31a..51fc3913 100644
--- a/components/PasswordDialog.qml
+++ b/components/PasswordDialog.qml
@@ -35,37 +35,45 @@ import QtQuick.Window 2.0
import "../components" as MoneroComponents
-Window {
+Item {
id: root
- modality: Qt.ApplicationModal
- flags: Qt.Window | Qt.FramelessWindowHint
+ 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
// same signals as Dialog has
signal accepted()
signal rejected()
-
+ signal closeCallback()
function open(walletName) {
root.walletName = walletName ? walletName : ""
+ leftPanel.enabled = false
+ middlePanel.enabled = false
+ titleBar.enabled = false
show()
+ root.visible = true;
+ passwordInput.focus = true
}
- // TODO: implement without hardcoding sizes
-// width: isMobile ? screenWidth : 480
-// height: isMobile ? screenHeight - mobileHeader.height : walletName ? 240 : 200
-
- // Make window draggable
- MouseArea {
- anchors.fill: parent
- property point lastMousePos: Qt.point(0, 0)
- onPressed: { lastMousePos = Qt.point(mouseX, mouseY); }
- onMouseXChanged: root.x += (mouseX - lastMousePos.x)
- onMouseYChanged: root.y += (mouseY - lastMousePos.y)
+ function close() {
+ leftPanel.enabled = true
+ middlePanel.enabled = true
+ titleBar.enabled = true
+ root.visible = false;
+ closeCallback();
}
ColumnLayout {
+ z: bg.z + 1
id: mainLayout
spacing: 10
anchors { fill: parent; margins: 35 * scaleRatio }
@@ -128,16 +136,9 @@ Window {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
anchors.bottomMargin: 3
+ Layout.maximumWidth: passwordInput.width
}
- // padding
- Rectangle {
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignHCenter
- height: 10
- opacity: 0
- color: "black"
- }
}
// Ok/Cancel buttons
RowLayout {
@@ -174,6 +175,3 @@ Window {
}
}
}
-
-
-