From 56d366116ab78b3d7829f6cc6f1c8d0da9b63afe Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Mon, 22 Dec 2014 20:50:17 +0100 Subject: [PATCH] Fix: Windows flags and raise behaviour. Also fix OSX quit issues. --- app/qml/AboutDialog.qml | 2 ++ app/qml/main.qml | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/qml/AboutDialog.qml b/app/qml/AboutDialog.qml index 8520827..3d85b28 100644 --- a/app/qml/AboutDialog.qml +++ b/app/qml/AboutDialog.qml @@ -9,6 +9,8 @@ Window{ width: 600 height: 400 + modality: Qt.ApplicationModal + ColumnLayout{ anchors.fill: parent anchors.margins: 15 diff --git a/app/qml/main.qml b/app/qml/main.qml index 1310f42..a23d9e2 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -68,12 +68,16 @@ ApplicationWindow{ id: quitAction text: qsTr("Quit") shortcut: "Ctrl+Shift+Q" - onTriggered: terminalWindow.close(); + onTriggered: Qt.quit(); } Action{ id: showsettingsAction text: qsTr("Settings") - onTriggered: settingswindow.show(); + onTriggered: { + settingswindow.show(); + settingswindow.requestActivate(); + settingswindow.raise(); + } } Action{ id: copyAction @@ -102,6 +106,8 @@ ApplicationWindow{ text: qsTr("About") onTriggered: { aboutDialog.show(); + aboutDialog.requestActivate(); + aboutDialog.raise(); } } ApplicationSettings{ @@ -134,4 +140,10 @@ ApplicationWindow{ } } Component.onCompleted: appSettings.handleFontChanged(); + onClosing: { + // OSX Since we are currently supporting only one window + // quit the application when it is closed. + if (Qt.platform.os === "osx") + Qt.quit() + } }