bar: add bluetooth connected icon state (#311)

* feat: add bluetooth connected icon state

* fix: improve connected check

* chore: cleanup

* format

---------

Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
This commit is contained in:
Laurens Duin 2025-08-02 08:04:42 +02:00 committed by GitHub
parent 5bddb40b3e
commit 32126e761f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,7 +109,13 @@ Item {
// Bluetooth icon
MaterialIcon {
animate: true
text: Bluetooth.defaultAdapter?.enabled ? "bluetooth" : "bluetooth_disabled"
text: {
if (!Bluetooth.defaultAdapter?.enabled)
return "bluetooth_disabled";
if (Bluetooth.devices.values.some(d => d.connected))
return "bluetooth_connected";
return "bluetooth";
}
color: root.colour
}