From 9303c1b52fd721233f2dbe15794b2117a54d520d Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Thu, 5 Jan 2023 21:36:45 -0500 Subject: bug: further shrink battery time-to text (#960) --- src/canvas/widgets/battery_display.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/canvas/widgets/battery_display.rs b/src/canvas/widgets/battery_display.rs index d69fe7bf..be557836 100644 --- a/src/canvas/widgets/battery_display.rs +++ b/src/canvas/widgets/battery_display.rs @@ -152,7 +152,7 @@ impl Painter { Row::new(vec!["Time to empty", &s]).style(style) } else { s = short_time(*secs); - Row::new(vec!["To empty", &s]).style(style) + Row::new(vec!["Empty", &s]).style(style) } } BatteryDuration::ToFull(secs) => { @@ -161,14 +161,15 @@ impl Painter { Row::new(vec!["Time to full", &s]).style(style) } else { s = short_time(*secs); - Row::new(vec!["To full", &s]).style(style) + Row::new(vec!["Full", &s]).style(style) } } BatteryDuration::Unknown => { - if half_width > 15 { + // TODO: Potentially just don't draw this? + if half_width > 20 { Row::new(vec!["Time to full/empty", "N/A"]).style(style) } else { - Row::new(vec!["To empty/full", "N/A"]).style(style) + Row::new(vec!["Empty/full", "N/A"]).style(style) } } } -- cgit v1.2.3