diff options
-rw-r--r-- | views/calendar/qml/WeekView.qml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/views/calendar/qml/WeekView.qml b/views/calendar/qml/WeekView.qml index c9717241..980ec432 100644 --- a/views/calendar/qml/WeekView.qml +++ b/views/calendar/qml/WeekView.qml | |||
@@ -198,13 +198,15 @@ FocusScope { | |||
198 | function roundToDay(date) { | 198 | function roundToDay(date) { |
199 | return new Date(date.getFullYear(), date.getMonth(), date.getDate()) | 199 | return new Date(date.getFullYear(), date.getMonth(), date.getDate()) |
200 | } | 200 | } |
201 | property bool isInPast: roundToDay(root.currentDate) > roundToDay(dayDelegate.date) | ||
202 | property bool isToday: roundToDay(root.currentDate).getTime() == roundToDay(dayDelegate.date).getTime() | ||
201 | 203 | ||
202 | //Dimm days in the past | 204 | //Dimm days in the past |
203 | Rectangle { | 205 | Rectangle { |
204 | anchors.fill: parent | 206 | anchors.fill: parent |
205 | color: Kube.Colors.buttonColor | 207 | color: Kube.Colors.buttonColor |
206 | opacity: 0.2 | 208 | opacity: 0.2 |
207 | visible: roundToDay(root.currentDate) > roundToDay(dayDelegate.date) | 209 | visible: isInPast |
208 | } | 210 | } |
209 | 211 | ||
210 | //Grid | 212 | //Grid |
@@ -298,7 +300,7 @@ FocusScope { | |||
298 | y: root.hourHeight * root.currentDate.getHours() + root.hourHeight / 60 * root.currentDate.getMinutes() | 300 | y: root.hourHeight * root.currentDate.getHours() + root.hourHeight / 60 * root.currentDate.getMinutes() |
299 | height: 2 | 301 | height: 2 |
300 | color: Kube.Colors.plasmaBlue | 302 | color: Kube.Colors.plasmaBlue |
301 | visible: root.currentDate.getDate() == dayDelegate.date.getDate() | 303 | visible: isToday |
302 | opacity: 0.8 | 304 | opacity: 0.8 |
303 | } | 305 | } |
304 | 306 | ||