bar: fix tray icons

This commit is contained in:
2 * r + 2 * t 2025-05-01 14:35:53 +10:00
parent eb367cea43
commit 16dcc07859
2 changed files with 13 additions and 5 deletions

View file

@ -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
}

View file

@ -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 {