feat(network): use libcosmic spinner for connecting states
This commit is contained in:
parent
1473e1f008
commit
c2a00a36a8
1 changed files with 4 additions and 17 deletions
|
|
@ -35,7 +35,7 @@ use cosmic::{
|
||||||
widget::{
|
widget::{
|
||||||
Id, button, column, container, divider,
|
Id, button, column, container, divider,
|
||||||
icon::{self, from_name},
|
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::{
|
use cosmic_dbus_networkmanager::interface::enums::{
|
||||||
|
|
@ -1516,12 +1516,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
];
|
];
|
||||||
match state {
|
match state {
|
||||||
ActiveConnectionState::Activating | ActiveConnectionState::Deactivating => {
|
ActiveConnectionState::Activating | ActiveConnectionState::Deactivating => {
|
||||||
btn_content.push(
|
btn_content.push(indeterminate_circular().size(24.0).into());
|
||||||
icon::from_name("process-working-symbolic")
|
|
||||||
.size(24)
|
|
||||||
.symbolic(true)
|
|
||||||
.into(),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
ActiveConnectionState::Activated => btn_content.push(
|
ActiveConnectionState::Activated => btn_content.push(
|
||||||
text::body(fl!("connected"))
|
text::body(fl!("connected"))
|
||||||
|
|
@ -1729,12 +1724,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
btn_content.push(ssid.into());
|
btn_content.push(ssid.into());
|
||||||
btn_content.push(
|
btn_content.push(indeterminate_circular().size(24.0).into());
|
||||||
icon::from_name("process-working-symbolic")
|
|
||||||
.size(24)
|
|
||||||
.symbolic(true)
|
|
||||||
.into(),
|
|
||||||
);
|
|
||||||
} else if matches!(known.state, DeviceState::Unavailable) {
|
} else if matches!(known.state, DeviceState::Unavailable) {
|
||||||
btn_content.push(
|
btn_content.push(
|
||||||
icon::from_name("network-wireless-disconnected-symbolic")
|
icon::from_name("network-wireless-disconnected-symbolic")
|
||||||
|
|
@ -1906,10 +1896,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
let connecting = padded_control(
|
let connecting = padded_control(
|
||||||
row::with_children([
|
row::with_children([
|
||||||
Element::from(id),
|
Element::from(id),
|
||||||
icon::from_name("process-working-symbolic")
|
indeterminate_circular().size(24.0).into(),
|
||||||
.size(24)
|
|
||||||
.symbolic(true)
|
|
||||||
.into(),
|
|
||||||
])
|
])
|
||||||
.spacing(8),
|
.spacing(8),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue