diff options
| author | Jaquee <jaquee.monero@gmail.com> | 2017-08-08 10:44:53 +0200 |
|---|---|---|
| committer | Jaquee <jaquee.monero@gmail.com> | 2017-11-03 16:57:11 +0100 |
| commit | 027ed0e328f38c503c864c5bec31ca3d2b509e87 (patch) | |
| tree | e0b3eb33e5155a4dd758e3b51c90bd60642d3855 | |
| parent | b82a17aa97141a32f0b4dc4adf5b0fa753840ecc (diff) | |
| download | monzero-gui-027ed0e328f38c503c864c5bec31ca3d2b509e87.tar.gz monzero-gui-027ed0e328f38c503c864c5bec31ca3d2b509e87.tar.xz monzero-gui-027ed0e328f38c503c864c5bec31ca3d2b509e87.zip | |
StandardDialog redesign
| -rw-r--r-- | components/StandardDialog.qml | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/components/StandardDialog.qml b/components/StandardDialog.qml index 5c62919c..ae2b79ff 100644 --- a/components/StandardDialog.qml +++ b/components/StandardDialog.qml @@ -35,10 +35,10 @@ import QtQuick.Window 2.0 import "../components" as MoneroComponents -Window { +Rectangle { id: root - modality: Qt.ApplicationModal - flags: Qt.Window | Qt.FramelessWindowHint + color: "white" + visible: false property alias title: dialogTitle.text property alias text: dialogContent.text property alias content: root.text @@ -53,6 +53,7 @@ Window { // same signals as Dialog has signal accepted() signal rejected() + signal closeCallback(); // Make window draggable MouseArea { @@ -64,7 +65,19 @@ Window { } function open() { + // Center + if(!isMobile) { + root.x = appWindow.width/2 - root.width/2 + root.y = screenHeight/2 - root.height/2 + } show() + root.z = 11 + root.visible = true; + } + + function close() { + root.visible = false; + closeCallback(); } // TODO: implement without hardcoding sizes |
