Improve scrolling calendar

This commit is contained in:
Ilya
2022-04-12 23:30:52 +02:00
parent 1b5c4c1795
commit 28527109b6
3 changed files with 149 additions and 49 deletions
+3 -2
View File
@@ -82,18 +82,19 @@ fn main() -> Result<(), core::convert::Infallible> {
fg_color,
bg_color,
hi_color: TriColor::Red,
border_color: TriColor::Black,
};
let calendar_week = ScrollingCalendar {
top_left: Point::new(400, 10),
size: Size::new(396, 396),
size: Size::new(396, 496),
style: calendar_style,
day: chrono::Local::now()
.naive_local()
.date()
.checked_add_signed(chrono::Duration::days(28 * 4 * 0 - 14))
.unwrap(),
weeks: 5,
weeks: 7,
};
calendar_week.draw(&mut display)?;