Skip to content

Commit

Permalink
WIP: Generate separators and strings taking into account the display …
Browse files Browse the repository at this point in the history
…state #7
  • Loading branch information
h1romas4 committed Aug 12, 2024
1 parent 94f76c2 commit 7f29cf3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ impl Line {
.chars()
.map(|c| if c.is_ascii() { 1 } else { 2 })
.sum::<usize>();
// 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.
Expand All @@ -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!(
Expand Down

0 comments on commit 7f29cf3

Please sign in to comment.