diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-09 21:02:24 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-09 21:02:24 +1000 |
| commit | 5b81104ffa22465e8f97a4d625e1a151c5d50c2f (patch) | |
| tree | afa1047b6d811a05acef112877ae43a9a0025760 /modules/bar/components | |
| parent | plugin/service: remove zero ref warning (diff) | |
| download | caelestia-shell-5b81104ffa22465e8f97a4d625e1a151c5d50c2f.tar.gz caelestia-shell-5b81104ffa22465e8f97a4d625e1a151c5d50c2f.tar.bz2 caelestia-shell-5b81104ffa22465e8f97a4d625e1a151c5d50c2f.zip | |
bar/tray: add icon subs
Usage: array of { id, image | icon }
Diffstat (limited to 'modules/bar/components')
| -rw-r--r-- | modules/bar/components/TrayItem.qml | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/modules/bar/components/TrayItem.qml b/modules/bar/components/TrayItem.qml index 6e7c2c5..9911907 100644 --- a/modules/bar/components/TrayItem.qml +++ b/modules/bar/components/TrayItem.qml @@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound import qs.components.effects import qs.services import qs.config +import qs.utils import Quickshell.Services.SystemTray import QtQuick @@ -26,14 +27,7 @@ MouseArea { id: icon anchors.fill: parent - source: { - let icon = root.modelData.icon; - if (icon.includes("?path=")) { - const [name, path] = icon.split("?path="); - icon = Qt.resolvedUrl(`${path}/${name.slice(name.lastIndexOf("/") + 1)}`); - } - return icon; - } + source: Icons.getTrayIcon(root.modelData.id, root.modelData.icon) colour: Colours.palette.m3secondary layer.enabled: Config.bar.tray.recolour } |