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:
parent
5bddb40b3e
commit
32126e761f
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue