cargo fmt
This commit is contained in:
@@ -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 {
|
||||
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(
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user