aboutsummaryrefslogtreecommitdiff
path: root/src/views.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-01-25 09:51:36 +0000
committerAkshay <[email protected]>2021-01-25 09:51:36 +0000
commitc26de6fbfd55cca906b9c184621a9f550cdcc0f1 (patch)
treec607cd0e5ba3d371a4d4529a76dde3305c3a8807 /src/views.rs
parent85670bd3c1297053592c8c2863185bda681d5185 (diff)
attempt to style cursor
Diffstat (limited to 'src/views.rs')
-rw-r--r--src/views.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/views.rs b/src/views.rs
index 4f78ca2..a0beb2c 100644
--- a/src/views.rs
+++ b/src/views.rs
@@ -44,7 +44,6 @@ where
44 let todo_style = Style::from(CONFIGURATION.todo_color()); 44 let todo_style = Style::from(CONFIGURATION.todo_color());
45 let future_style = Style::from(CONFIGURATION.inactive_color()); 45 let future_style = Style::from(CONFIGURATION.inactive_color());
46 46
47 let cursor_style = cursor_gen();
48 let strikethrough = Style::from(Effect::Strikethrough); 47 let strikethrough = Style::from(Effect::Strikethrough);
49 48
50 let goal_status = is_today && self.reached_goal(Local::now().naive_local().date()); 49 let goal_status = is_today && self.reached_goal(Local::now().naive_local().date());
@@ -113,9 +112,12 @@ where
113 let draw_day = |printer: &Printer| { 112 let draw_day = |printer: &Printer| {
114 let mut i = 0; 113 let mut i = 0;
115 while let Some(d) = NaiveDate::from_ymd_opt(year, month, i + 1) { 114 while let Some(d) = NaiveDate::from_ymd_opt(year, month, i + 1) {
116 let mut day_style = cursor_style.combine(todo_style); 115 let mut day_style = todo_style;
117 if self.reached_goal(d) { 116 if self.reached_goal(d) {
118 day_style = day_style.combine(goal_reached_style); 117 day_style = goal_reached_style;
118 }
119 if d == now && printer.focused {
120 day_style = day_style.combine(cursor_gen(day_style));
119 } 121 }
120 let coords: Vec2 = ((i % 7) * 3, i / 7 + 2).into(); 122 let coords: Vec2 = ((i % 7) * 3, i / 7 + 2).into();
121 if let Some(c) = self.get_by_date(d) { 123 if let Some(c) = self.get_by_date(d) {