summaryrefslogtreecommitdiff
path: root/qml/Systray.qml
diff options
context:
space:
mode:
authorFabien Proriol <fabien.proriol@kazoe.org>2025-05-28 10:33:25 +0200
committerFabien Proriol <fabien.proriol@kazoe.org>2025-05-28 10:33:25 +0200
commitbd0ceea108216fc824532d493f961edaf3e617ff (patch)
tree5975a255b8a966f5b8426141f417b318b1434cf0 /qml/Systray.qml
parent49daa163530ceabc9eaa8911ab96b5f799cfb552 (diff)
Add XDG SystrayHEADmaster
Diffstat (limited to 'qml/Systray.qml')
-rw-r--r--qml/Systray.qml52
1 files changed, 52 insertions, 0 deletions
diff --git a/qml/Systray.qml b/qml/Systray.qml
new file mode 100644
index 0000000..8fb92ce
--- /dev/null
+++ b/qml/Systray.qml
@@ -0,0 +1,52 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Controls.impl 2.15
+import org.kazoe.xdg 1.0
+
+Rectangle {
+ color: "transparent"
+ width: view.contentWidth
+ height: systrayView.height
+
+ StatusNotifierHost {
+ id: systrayModel
+ }
+
+ ListView {
+ id: view
+ orientation: ListView.Horizontal
+ anchors.fill: parent
+ anchors.margins: 2
+ model: systrayModel
+ delegate: Rectangle {
+ visible: iconName.length && status !== "Passive"
+ height: view.height
+ width: visible ? height : 0
+ color: "transparent"
+
+ IconImage {
+ anchors.fill: parent
+ name: iconName
+ color: "transparent"
+ }
+
+ IconImage {
+ id: overlay
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+ width: parent.width / 2
+ height: parent.height / 2
+ visible: overlayIconName.length
+ name: overlayIconName
+ color: "transparent"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ systrayModel.activate(0, 0, idItem, 0)
+ }
+ }
+ }
+ }
+}