From 3ae58d42aa297f7cbb36783363b5bc46ba0f9e82 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Mon, 23 Sep 2019 16:20:15 -0700 Subject: [PATCH] Mark really early times as red too. More relevant for BST. --- src/bin/work.rs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/bin/work.rs b/src/bin/work.rs index 4017fa7..482712a 100644 --- a/src/bin/work.rs +++ b/src/bin/work.rs @@ -33,11 +33,19 @@ fn main() { let mut dt = DateTimeWidget::tz("%H:%M %Z".to_string(), "Europe/London".to_string()); dt.set_colors(&vec![ TimeColor { - start: NaiveTime::from_hms(15, 0, 0), + start: NaiveTime::from_hms(0, 0, 0), + color: ColorRGB::red(), + }, + TimeColor { + start: NaiveTime::from_hms(8, 0, 0), + color: ColorRGB(255, 255, 255), + }, + TimeColor { + start: NaiveTime::from_hms(17, 0, 0), color: ColorRGB::yellow(), }, TimeColor { - start: NaiveTime::from_hms(16, 0, 0), + start: NaiveTime::from_hms(18, 0, 0), color: ColorRGB::red(), }, ]); @@ -45,6 +53,14 @@ fn main() { let mut dt = DateTimeWidget::new("%m/%d %H:%M".to_string()); dt.set_colors(&vec![ + TimeColor { + start: NaiveTime::from_hms(0, 0, 0), + color: ColorRGB::red(), + }, + TimeColor { + start: NaiveTime::from_hms(7, 0, 0), + color: ColorRGB(255, 255, 255), + }, TimeColor { start: NaiveTime::from_hms(15, 0, 0), color: ColorRGB::yellow(),