diff --git a/cosmic-settings/src/pages/bluetooth/mod.rs b/cosmic-settings/src/pages/bluetooth/mod.rs index 90a77b2..b24a2f8 100644 --- a/cosmic-settings/src/pages/bluetooth/mod.rs +++ b/cosmic-settings/src/pages/bluetooth/mod.rs @@ -903,6 +903,7 @@ fn connected_devices() -> Section { fn available_devices() -> Section { crate::slab!(descriptions { + device_connect = fl!("bluetooth", "connect"); device_connecting = fl!("bluetooth", "connecting"); }); @@ -938,18 +939,15 @@ fn available_devices() -> Section { widget::horizontal_space().into(), ]; - if device.enabled == Active::Enabling { - items.push( - text(&descriptions[device_connecting]) - .class(theme::Text::Color(color!(128, 128, 128))) - .into(), - ); + if device.enabled == Active::Disabled { + items.push(widget::button::text(&descriptions[device_connect]).on_press(Message::ConnectDevice(path.clone())).into(), ) } - Some( - widget::mouse_area(settings::item_row(items)) - .on_press(Message::ConnectDevice(path.clone())) - .into(), - ) + + if device.enabled == Active::Enabling || device.enabled == Active::Enabled { + items.push(text(&descriptions[device_connecting]).class(theme::Text::Color(color!(128, 128, 128))).into(), ); + } + + Some(widget::mouse_area(settings::item_row(items)).into(), ) }) .fold(section, settings::Section::add) .apply(Element::from)