fix(battery): too many decimals in battery percent
Co-authored-by: Lucas Ribeiro <estg-lnr@tce.rs.gov.br>
This commit is contained in:
parent
53848e4201
commit
f9c01f54d2
1 changed files with 1 additions and 1 deletions
|
|
@ -430,7 +430,7 @@ impl cosmic::Application for CosmicBatteryApplet {
|
|||
fn view_window(&self, _id: window::Id) -> Element<Message> {
|
||||
let name = text(fl!("battery")).size(14);
|
||||
let description = text(if !self.on_battery {
|
||||
format!("{}%", self.battery_percent)
|
||||
format!("{:.0}%", self.battery_percent)
|
||||
} else {
|
||||
format!(
|
||||
"{} {} ({:.0}%)",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue