Add simple system tray
This commit is contained in:
parent
acb1367f11
commit
bbcdcde53f
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
|
import Qt.labs.platform 1.1
|
||||||
import "Base"
|
import "Base"
|
||||||
import "PythonBridge"
|
import "PythonBridge"
|
||||||
|
|
||||||
|
@ -100,4 +101,19 @@ ApplicationWindow {
|
||||||
|
|
||||||
Behavior on scale { HNumberAnimation { overshoot: 3; factor: 1.2 } }
|
Behavior on scale { HNumberAnimation { overshoot: 3; factor: 1.2 } }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SystemTrayIcon {
|
||||||
|
property string iconPack: theme ? theme.icons.preferredPack : "thin"
|
||||||
|
|
||||||
|
visible: true
|
||||||
|
tooltip: qsTr("Mirage")
|
||||||
|
icon.source: `../icons/${iconPack}/tray-icon.png`
|
||||||
|
|
||||||
|
menu: Menu {
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("Quit")
|
||||||
|
onTriggered: window.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
src/icons/thin/tray-icon.png
Normal file
BIN
src/icons/thin/tray-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Loading…
Reference in New Issue
Block a user