cargo fmt

This commit is contained in:
2026-09-17 12:37:44 +01:00
parent 5f338c4278
commit cf7683ebfd
+11 -19
View File
@@ -153,14 +153,11 @@ impl Battery {
let shell: Element<'_, Wire> = match (self.numbers_in_icon, self.percent) { let shell: Element<'_, Wire> = match (self.numbers_in_icon, self.percent) {
(true, Some(percent)) => stack![ (true, Some(percent)) => stack![
shell, shell,
container( container(text(format!("{percent}")).size(10).font(bold()).style(
text(format!("{percent}")) |theme: &Theme| text::Style {
.size(10) color: Some(theme.palette().text),
.font(bold()) }
.style(|theme: &Theme| text::Style { ),)
color: Some(theme.palette().text),
}),
)
.width(Length::Fill) .width(Length::Fill)
.height(Length::Fill) .height(Length::Fill)
.align_x(alignment::Horizontal::Center) .align_x(alignment::Horizontal::Center)
@@ -192,13 +189,11 @@ impl Battery {
.into() .into()
}; };
// Container carries the module id so the popup can anchor to it. // Container carries the module id so the popup can anchor to it.
container( container(mouse_area(bar).on_press(Wire::module(
mouse_area(bar).on_press(Wire::module( Endpoint::module(self.id()),
Endpoint::module(self.id()), self.id(),
self.id(), BatteryAction::OpenPopup,
BatteryAction::OpenPopup, )))
)),
)
.style(pill) .style(pill)
.height(Length::Fill) .height(Length::Fill)
.align_y(alignment::Vertical::Center) .align_y(alignment::Vertical::Center)
@@ -232,10 +227,7 @@ impl Battery {
}; };
lines = lines.push(text(eta)); lines = lines.push(text(eta));
} }
container(lines) container(lines).padding(16).width(Length::Fill).into()
.padding(16)
.width(Length::Fill)
.into()
} }
} }