quickshell-config/SysTray.qml

55 lines
1.4 KiB
QML
Raw Normal View History

2025-05-03 13:04:07 +02:00
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import QtQuick.Effects
2025-05-06 09:38:56 +02:00
import QtQuick.Controls
2025-05-03 13:04:07 +02:00
import Quickshell
import Quickshell.Services.SystemTray
Rectangle {
id: root
required property var bar
2025-05-06 09:38:56 +02:00
anchors.horizontalCenter: parent.horizontalCenter
2025-05-03 13:04:07 +02:00
2025-05-06 09:38:56 +02:00
ColumnLayout {
id: column
spacing: 35
2025-05-03 13:04:07 +02:00
Repeater {
model: SystemTray.items
Item {
id: item
required property SystemTrayItem modelData
2025-05-06 09:38:56 +02:00
Item {
height: 30
width: 30
anchors.horizontalCenter: parent.horizontalCenter
Image {
source: item.modelData.icon
anchors.fill: parent
MouseArea {
anchors.fill: parent
onClicked: function (mouse) {
if (mouse.button === Qt.LeftButton) {
item.modelData.activate();
}
if (mouse.button === Qt.RightButton) {
if (item.modelData.hasMenu) {
}
}
}
}
}
}
2025-05-03 13:04:07 +02:00
}
}
}
}