mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 20:20:02 +00:00
StandardDialog redesign
This commit is contained in:
parent
b82a17aa97
commit
027ed0e328
1 changed files with 16 additions and 3 deletions
|
@ -35,10 +35,10 @@ import QtQuick.Window 2.0
|
||||||
|
|
||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
|
|
||||||
Window {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
modality: Qt.ApplicationModal
|
color: "white"
|
||||||
flags: Qt.Window | Qt.FramelessWindowHint
|
visible: false
|
||||||
property alias title: dialogTitle.text
|
property alias title: dialogTitle.text
|
||||||
property alias text: dialogContent.text
|
property alias text: dialogContent.text
|
||||||
property alias content: root.text
|
property alias content: root.text
|
||||||
|
@ -53,6 +53,7 @@ Window {
|
||||||
// same signals as Dialog has
|
// same signals as Dialog has
|
||||||
signal accepted()
|
signal accepted()
|
||||||
signal rejected()
|
signal rejected()
|
||||||
|
signal closeCallback();
|
||||||
|
|
||||||
// Make window draggable
|
// Make window draggable
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@ -64,7 +65,19 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
function open() {
|
function open() {
|
||||||
|
// Center
|
||||||
|
if(!isMobile) {
|
||||||
|
root.x = appWindow.width/2 - root.width/2
|
||||||
|
root.y = screenHeight/2 - root.height/2
|
||||||
|
}
|
||||||
show()
|
show()
|
||||||
|
root.z = 11
|
||||||
|
root.visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
root.visible = false;
|
||||||
|
closeCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: implement without hardcoding sizes
|
// TODO: implement without hardcoding sizes
|
||||||
|
|
Loading…
Reference in a new issue