diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-01 14:35:53 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-01 14:35:53 +1000 |
| commit | 16dcc078590c3013fd1134b927dd289a6f1610e9 (patch) | |
| tree | b0a7bf740a7b0695d0364e32a87aa11e33058eb3 | |
| parent | feat: get networks (diff) | |
| download | caelestia-shell-16dcc078590c3013fd1134b927dd289a6f1610e9.tar.gz caelestia-shell-16dcc078590c3013fd1134b927dd289a6f1610e9.tar.bz2 caelestia-shell-16dcc078590c3013fd1134b927dd289a6f1610e9.zip | |
bar: fix tray icons
| -rw-r--r-- | modules/bar/components/TrayItem.qml | 10 | ||||
| -rw-r--r-- | services/Network.qml | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/modules/bar/components/TrayItem.qml b/modules/bar/components/TrayItem.qml index 6be2904..b050e5d 100644 --- a/modules/bar/components/TrayItem.qml +++ b/modules/bar/components/TrayItem.qml @@ -34,7 +34,15 @@ MouseArea { id: icon visible: !BarConfig.tray.recolourIcons - source: root.modelData.icon + source: { + let icon = root.modelData.icon; + if (icon.includes("?path=")) { + const [name, path] = icon.split("?path="); + icon = `file://${path}/${name.slice(name.lastIndexOf("/") + 1)}.png`; + } + return icon; + } + asynchronous: true anchors.fill: parent } diff --git a/services/Network.qml b/services/Network.qml index 67bcb48..3aa1dd6 100644 --- a/services/Network.qml +++ b/services/Network.qml @@ -57,10 +57,10 @@ Singleton { } component AccessPoint: QtObject { - property string ssid - property int strength - property int frequency - property bool active + required property string ssid + required property int strength + required property int frequency + required property bool active } Component { |