From 84a2a11d79d0937c9b133aa74183f450f27be94f Mon Sep 17 00:00:00 2001 From: shy Date: Thu, 15 Apr 2021 08:41:00 +0200 Subject: [PATCH] Dots may differ. --- src/clock.rs | 4 ++-- src/clock/font.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/clock.rs b/src/clock.rs index 6374bc9..5d4cd82 100644 --- a/src/clock.rs +++ b/src/clock.rs @@ -207,9 +207,9 @@ impl Clock { write!(stdout, "{}{}{}{}", cursor::Goto(pos.col, pos.line + 1), - self.font.dot, + self.font.dots.0, cursor::Goto(pos.col, pos.line + 3), - self.font.dot, + self.font.dots.1, )?; Ok(()) } diff --git a/src/clock/font.rs b/src/clock/font.rs index 8ed8076..c3d8548 100644 --- a/src/clock/font.rs +++ b/src/clock/font.rs @@ -4,14 +4,14 @@ const DIGIT_HEIGHT: u16 = 5; pub struct Font { pub height: u16, pub width: u16, - pub dot: char, + pub dots: (char, char), pub digits: [[&'static str; DIGIT_HEIGHT as usize]; 10], } pub const NORMAL: Font = Font { height: DIGIT_HEIGHT, width: 5, - dot: '■', + dots: ('■', '■'), digits: [[ // 0 "█▀▀▀█", @@ -88,7 +88,7 @@ pub const NORMAL: Font = Font { pub const PLAIN: Font = Font { height: DIGIT_HEIGHT, width: 5, - dot: '█', + dots: ('█', '█'), digits: [[ // 0 "█████", @@ -165,7 +165,7 @@ pub const PLAIN: Font = Font { pub const CHROME: Font = Font { height: DIGIT_HEIGHT, width: 5, - dot: '■', + dots: ('▄', '🮏'), digits: [[ // 0 "█▀▀▀█",