diff options
| -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 { |