summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/components/MainView.qml3
-rw-r--r--gui/components/StatusBox.qml11
-rw-r--r--gui/components/Systray.qml7
3 files changed, 9 insertions, 12 deletions
diff --git a/gui/components/MainView.qml b/gui/components/MainView.qml
index 946e36f..25a388c 100644
--- a/gui/components/MainView.qml
+++ b/gui/components/MainView.qml
@@ -77,6 +77,9 @@ Page {
text: qsTr("Quit")
icon: "../resources/quit.svg"
triggered: function() {
+ if (ctx.status == "on") {
+ backend.switchOff()
+ }
Qt.callLater(backend.quit)
}
}
diff --git a/gui/components/StatusBox.qml b/gui/components/StatusBox.qml
index bfcc175..7715123 100644
--- a/gui/components/StatusBox.qml
+++ b/gui/components/StatusBox.qml
@@ -56,13 +56,6 @@ Item {
}
onClicked: {
settingsDrawer.toggle()
- /*
- if (stackView.depth > 1) {
- stackView.pop()
- } else {
- settingsDrawer.toggle()
- }
- */
}
Icon {
@@ -71,10 +64,6 @@ Item {
height: 16
anchors.centerIn: settingsButton
source: "../resources/gear-fill.svg"
- /*
- source: stackView.depth
- > 1 ? "../resources/arrow-left.svg" : "../resources/gear-fill.svg"
- */
}
}
diff --git a/gui/components/Systray.qml b/gui/components/Systray.qml
index f89bd16..51f3148 100644
--- a/gui/components/Systray.qml
+++ b/gui/components/Systray.qml
@@ -55,7 +55,12 @@ Labs.SystemTrayIcon {
Labs.MenuItem {
//: Part of the systray menu; quits the application
text: qsTr("Quit")
- onTriggered: backend.quit()
+ onTriggered: {
+ if (ctx.status == "on") {
+ backend.switchOff()
+ }
+ backend.quit()
+ }
}
}