mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 09:36:46 +00:00
35 lines
803 B
QML
35 lines
803 B
QML
pragma ComponentBehavior: Bound
|
|
|
|
import qs.components.effects
|
|
import qs.services
|
|
import qs.config
|
|
import qs.utils
|
|
import Quickshell.Services.SystemTray
|
|
import QtQuick
|
|
|
|
MouseArea {
|
|
id: root
|
|
|
|
required property SystemTrayItem modelData
|
|
|
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
|
implicitWidth: Appearance.font.size.small * 2
|
|
implicitHeight: Appearance.font.size.small * 2
|
|
|
|
onClicked: event => {
|
|
if (event.button === Qt.LeftButton)
|
|
modelData.activate();
|
|
else
|
|
modelData.secondaryActivate();
|
|
}
|
|
|
|
ColouredIcon {
|
|
id: icon
|
|
|
|
anchors.fill: parent
|
|
source: Icons.getTrayIcon(root.modelData.id, root.modelData.icon)
|
|
colour: Colours.palette.m3secondary
|
|
layer.enabled: Config.bar.tray.recolour
|
|
}
|
|
}
|