feat(network): use libcosmic spinner for connecting states

This commit is contained in:
Fred 2026-06-26 18:30:06 +02:00 committed by GitHub
parent 1473e1f008
commit c2a00a36a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,7 +35,7 @@ use cosmic::{
widget::{
Id, button, column, container, divider,
icon::{self, from_name},
row, scrollable, secure_input, text, text_input, toggler,
indeterminate_circular, row, scrollable, secure_input, text, text_input, toggler,
},
};
use cosmic_dbus_networkmanager::interface::enums::{
@ -1516,12 +1516,7 @@ impl cosmic::Application for CosmicNetworkApplet {
];
match state {
ActiveConnectionState::Activating | ActiveConnectionState::Deactivating => {
btn_content.push(
icon::from_name("process-working-symbolic")
.size(24)
.symbolic(true)
.into(),
);
btn_content.push(indeterminate_circular().size(24.0).into());
}
ActiveConnectionState::Activated => btn_content.push(
text::body(fl!("connected"))
@ -1729,12 +1724,7 @@ impl cosmic::Application for CosmicNetworkApplet {
.into(),
);
btn_content.push(ssid.into());
btn_content.push(
icon::from_name("process-working-symbolic")
.size(24)
.symbolic(true)
.into(),
);
btn_content.push(indeterminate_circular().size(24.0).into());
} else if matches!(known.state, DeviceState::Unavailable) {
btn_content.push(
icon::from_name("network-wireless-disconnected-symbolic")
@ -1906,10 +1896,7 @@ impl cosmic::Application for CosmicNetworkApplet {
let connecting = padded_control(
row::with_children([
Element::from(id),
icon::from_name("process-working-symbolic")
.size(24)
.symbolic(true)
.into(),
indeterminate_circular().size(24.0).into(),
])
.spacing(8),
);