From 5eb07fabc88069936bb9d71efe615d7c98621ce5 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 12 Jul 2024 17:04:14 +0200 Subject: [PATCH] refactor: move additional information like date and timebar over clockw --- src/clock.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/clock.rs b/src/clock.rs index 855cd25..162eb0f 100644 --- a/src/clock.rs +++ b/src/clock.rs @@ -485,8 +485,8 @@ impl Clock { let part = Layout::default() .direction(Direction::Vertical) .constraints([ - Constraint::Length(if r.width > 80 { 8 } else { 5 }), Constraint::Length(3), + Constraint::Length(if r.width > 80 { 8 } else { 5 }), ]) .split(r); let hlen_date: u16 = (f32::from(part[1].width) * 0.35) as u16; @@ -494,10 +494,10 @@ impl Clock { .direction(Direction::Horizontal) .constraints([ Constraint::Length(hlen_date), - Constraint::Length(part[1].width - hlen_date), + Constraint::Length(part[0].width - hlen_date), ]) - .split(part[1]); + .split(part[0]); - vec![part[0], subparts[0], subparts[1]] + vec![part[1], subparts[0], subparts[1]] } }