From 5b81104ffa22465e8f97a4d625e1a151c5d50c2f Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 9 Sep 2025 21:02:24 +1000 Subject: bar/tray: add icon subs Usage: array of { id, image | icon } --- modules/bar/components/TrayItem.qml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'modules/bar/components') 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 } -- cgit v1.2.3-freya