remove useless conversions
This commit is contained in:
parent
974367f312
commit
12ef9ce993
4 changed files with 17 additions and 31 deletions
|
|
@ -121,7 +121,6 @@ impl DockItem {
|
|||
|
||||
let dot_radius = 2;
|
||||
let dots = (0..toplevels.len())
|
||||
.into_iter()
|
||||
.map(|_| {
|
||||
container(vertical_space(Length::Fixed(0.0)))
|
||||
.padding(dot_radius)
|
||||
|
|
|
|||
|
|
@ -293,30 +293,24 @@ async fn start_listening(
|
|||
let conn_settings: HashMap<&str, HashMap<&str, zvariant::Value>> =
|
||||
HashMap::from([
|
||||
(
|
||||
"802-11-wireless".into(),
|
||||
"802-11-wireless",
|
||||
HashMap::from([(
|
||||
"ssid".into(),
|
||||
"ssid",
|
||||
Value::Array(ssid.as_bytes().into()),
|
||||
)]),
|
||||
),
|
||||
(
|
||||
"connection".into(),
|
||||
"connection",
|
||||
HashMap::from([
|
||||
("id".into(), Value::Str(ssid.as_str().into())),
|
||||
(
|
||||
"type".into(),
|
||||
Value::Str("802-11-wireless".into()),
|
||||
),
|
||||
("id", Value::Str(ssid.as_str().into())),
|
||||
("type", Value::Str("802-11-wireless".into())),
|
||||
]),
|
||||
),
|
||||
(
|
||||
"802-11-wireless-security".into(),
|
||||
"802-11-wireless-security",
|
||||
HashMap::from([
|
||||
(
|
||||
"psk".into(),
|
||||
Value::Str(password.as_str().into()),
|
||||
),
|
||||
("key-mgmt".into(), Value::Str("wpa-psk".into())),
|
||||
("psk", Value::Str(password.as_str().into())),
|
||||
("key-mgmt", Value::Str("wpa-psk".into())),
|
||||
]),
|
||||
),
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ impl cosmic::Application for Notifications {
|
|||
let do_not_disturb = padded_control(row![anim!(
|
||||
DO_NOT_DISTURB,
|
||||
&self.timeline,
|
||||
String::from(fl!("do-not-disturb")),
|
||||
fl!("do-not-disturb"),
|
||||
self.config.do_not_disturb,
|
||||
Message::DoNotDisturb
|
||||
)
|
||||
|
|
@ -442,9 +442,7 @@ impl cosmic::Application for Notifications {
|
|||
info!("app_icon: {:?}", &n.app_icon);
|
||||
if n.app_icon.is_empty() {
|
||||
match n.image().cloned() {
|
||||
Some(Image::File(p)) => {
|
||||
Some(cosmic::widget::icon::from_path(PathBuf::from(p)))
|
||||
}
|
||||
Some(Image::File(p)) => Some(cosmic::widget::icon::from_path(p)),
|
||||
Some(Image::Name(name)) => {
|
||||
Some(cosmic::widget::icon::from_name(name).handle())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,18 +222,13 @@ impl cosmic::Application for IcedWorkspacesApplet {
|
|||
}
|
||||
|
||||
fn subscription(&self) -> Subscription<Message> {
|
||||
Subscription::batch(
|
||||
vec![
|
||||
workspaces(0).map(Message::WorkspaceUpdate),
|
||||
subscription::events_with(|e, _| match e {
|
||||
Mouse(mouse::Event::WheelScrolled { delta }) => {
|
||||
Some(Message::WheelScrolled(delta))
|
||||
}
|
||||
_ => None,
|
||||
}),
|
||||
]
|
||||
.into_iter(),
|
||||
)
|
||||
Subscription::batch(vec![
|
||||
workspaces(0).map(Message::WorkspaceUpdate),
|
||||
subscription::events_with(|e, _| match e {
|
||||
Mouse(mouse::Event::WheelScrolled { delta }) => Some(Message::WheelScrolled(delta)),
|
||||
_ => None,
|
||||
}),
|
||||
])
|
||||
}
|
||||
|
||||
fn style(&self) -> Option<<Theme as application::StyleSheet>::Style> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue