summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-04 12:53:34 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-04 12:53:34 +0200
commit6c4284d109158f8a2ade413f4f455486055b870a (patch)
tree8a1e6c7eb4eb644d722e0c94e0aa6001a111b1e4
parentf1c482d5a38173f5be62daeed45aa64cf3fcff07 (diff)
downloadkube-6c4284d109158f8a2ade413f4f455486055b870a.tar.gz
kube-6c4284d109158f8a2ade413f4f455486055b870a.zip
Deal with month changes
-rw-r--r--views/calendar/qml/WeekView.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/views/calendar/qml/WeekView.qml b/views/calendar/qml/WeekView.qml
index 2f778d3b..ba9b24d2 100644
--- a/views/calendar/qml/WeekView.qml
+++ b/views/calendar/qml/WeekView.qml
@@ -232,12 +232,16 @@ FocusScope {
232 232
233 color: Kube.Colors.viewBackgroundColor 233 color: Kube.Colors.viewBackgroundColor
234 234
235 function roundToDay(date) {
236 return new Date(date.getFullYear(), date.getMonth(), date.getDate())
237 }
238
235 //Dimm days in the past 239 //Dimm days in the past
236 Rectangle { 240 Rectangle {
237 anchors.fill: parent 241 anchors.fill: parent
238 color: Kube.Colors.buttonColor 242 color: Kube.Colors.buttonColor
239 opacity: 0.2 243 opacity: 0.2
240 visible: root.currentDate.getDate() > dayDelegate.date.getDate() 244 visible: roundToDay(root.currentDate) > roundToDay(dayDelegate.date)
241 } 245 }
242 246
243 //Grid 247 //Grid