33 lines
827 B
QML
33 lines
827 B
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell.Services.SystemTray
|
|
import Quickshell.Widgets
|
|
import "../../config"
|
|
|
|
RowLayout {
|
|
spacing: Appearance.spacing
|
|
|
|
Repeater {
|
|
model: SystemTray.items
|
|
|
|
delegate: IconImage {
|
|
id: trayIcon
|
|
required property var modelData
|
|
implicitWidth: 16
|
|
implicitHeight: 16
|
|
source: modelData.icon
|
|
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
|
onClicked: (mouse) => {
|
|
if (mouse.button === Qt.LeftButton)
|
|
trayIcon.modelData.activate()
|
|
else
|
|
trayIcon.modelData.secondaryActivate()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|