summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2021-03-26 17:53:57 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-05-04 14:58:39 +0200
commita9f8f9d55277598636b680fd952755c5ecb46b8b (patch)
tree8e09fceb36df3b9bc6c07411708b638ab9ba19d4 /gui
parent67a68be2290b3af6e7d2897e52b3cd19d1f4450d (diff)
Toggle app window visibility clicking on the systray icon
Diffstat (limited to 'gui')
-rw-r--r--gui/qml/main.qml19
1 files changed, 7 insertions, 12 deletions
diff --git a/gui/qml/main.qml b/gui/qml/main.qml
index ddd049d..a29c8d1 100644
--- a/gui/qml/main.qml
+++ b/gui/qml/main.qml
@@ -320,10 +320,15 @@ Window {
id: systray
visible: systrayVisible
- signal activatedSignal
onActivated: {
- systray.activatedSignal()
+ if (reason != SystemTrayIcon.Context) {
+ if (app.visible) {
+ app.hide()
+ } else {
+ app.show()
+ }
+ }
}
@@ -336,16 +341,6 @@ Window {
id: systrayMenu
- Connections {
- target: systray
- onActivatedSignal: {
- if (Qt.platform.os === "windows" || desktop === "LXQt") {
- console.debug("open systray menu")
- systrayMenu.open()
- }
- }
- }
-
MenuItem {
id: statusItem
text: qsTr("Checking status…")