Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/ashell_icon.ttf
Binary file not shown.
2 changes: 2 additions & 0 deletions src/components/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pub enum StaticIcon {
Ethernet,
Vpn,
Bluetooth,
BluetoothConnected,
PowerSaver,
Balanced,
Performance,
Expand Down Expand Up @@ -154,6 +155,7 @@ impl Icon for StaticIcon {
StaticIcon::Ethernet => "\u{f0200}",
StaticIcon::Vpn => "\u{f0582}",
StaticIcon::Bluetooth => "\u{f00af}",
StaticIcon::BluetoothConnected => "\u{f00b1}",
StaticIcon::PowerSaver => "\u{f0f86}",
StaticIcon::Balanced => "\u{f0f85}",
StaticIcon::Performance => "\u{f04c5}",
Expand Down
8 changes: 6 additions & 2 deletions src/modules/settings/bluetooth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,13 @@ impl BluetoothSettings {
) -> Option<Element<'a, Message>> {
if let Some(service) = &self.service
&& service.state == BluetoothState::Active
&& !service.devices.is_empty()
{
return Some(icon(StaticIcon::Bluetooth).into());
let connected_count = service.devices.iter().filter(|d| d.connected).count();
if connected_count > 0 {
return Some(icon(StaticIcon::BluetoothConnected).into());
} else {
return Some(icon(StaticIcon::Bluetooth).into());
}
}
None
}
Expand Down