diff --git a/crates/modules/src/battery.rs b/crates/modules/src/battery.rs index e32d767..e8e283b 100644 --- a/crates/modules/src/battery.rs +++ b/crates/modules/src/battery.rs @@ -153,14 +153,11 @@ impl Battery { let shell: Element<'_, Wire> = match (self.numbers_in_icon, self.percent) { (true, Some(percent)) => stack![ shell, - container( - text(format!("{percent}")) - .size(10) - .font(bold()) - .style(|theme: &Theme| text::Style { - color: Some(theme.palette().text), - }), - ) + container(text(format!("{percent}")).size(10).font(bold()).style( + |theme: &Theme| text::Style { + color: Some(theme.palette().text), + } + ),) .width(Length::Fill) .height(Length::Fill) .align_x(alignment::Horizontal::Center) @@ -192,13 +189,11 @@ impl Battery { .into() }; // Container carries the module id so the popup can anchor to it. - container( - mouse_area(bar).on_press(Wire::module( - Endpoint::module(self.id()), - self.id(), - BatteryAction::OpenPopup, - )), - ) + container(mouse_area(bar).on_press(Wire::module( + Endpoint::module(self.id()), + self.id(), + BatteryAction::OpenPopup, + ))) .style(pill) .height(Length::Fill) .align_y(alignment::Vertical::Center) @@ -232,10 +227,7 @@ impl Battery { }; lines = lines.push(text(eta)); } - container(lines) - .padding(16) - .width(Length::Fill) - .into() + container(lines).padding(16).width(Length::Fill).into() } }