From 7f29cf3ab8b2be257c0be016aac6bcba965bfffb Mon Sep 17 00:00:00 2001 From: h1romas4 Date: Mon, 12 Aug 2024 15:33:15 +0900 Subject: [PATCH] WIP: Generate separators and strings taking into account the display state #7 --- src/line.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/line.rs b/src/line.rs index 02cb351..f6cba39 100644 --- a/src/line.rs +++ b/src/line.rs @@ -98,6 +98,7 @@ impl Line { .chars() .map(|c| if c.is_ascii() { 1 } else { 2 }) .sum::(); + // TODO: display Calculation of width taking into account boolean values. let width = ((timezone_len + date.len() + time.len()) as i32) + self.padding; let width = width as usize; // There are cases where cols may be declared momentarily low at render time. @@ -119,6 +120,7 @@ impl Line { let date = style!(self.foreground_color, self.background_color).paint(date); let time = style!(self.foreground_color, self.background_color).paint(time); + // TODO: Generate separators and strings taking into account the display state. match self.text_align { TextAlign::Right => { format!(