From 57db4a7edbaa3b749ba44524d37fcc580b97fca5 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 1 Aug 2018 18:30:25 +0200 Subject: Dimm past days and show a line at the current time --- views/calendar/main.qml | 2 +- views/calendar/qml/WeekView.qml | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'views') diff --git a/views/calendar/main.qml b/views/calendar/main.qml index e72d4941..07ee6302 100644 --- a/views/calendar/main.qml +++ b/views/calendar/main.qml @@ -143,7 +143,7 @@ ApplicationWindow { View { anchors.fill: parent - currentDate: "2018-04-09" + currentDate: "2018-04-11T13:00:00" autoUpdateDate: false } } diff --git a/views/calendar/qml/WeekView.qml b/views/calendar/qml/WeekView.qml index c8d0ab7b..868e7ee9 100644 --- a/views/calendar/qml/WeekView.qml +++ b/views/calendar/qml/WeekView.qml @@ -192,9 +192,10 @@ FocusScope { length: 7 } delegate: Rectangle { - id: day + id: dayDelegate property var events: model.events + property var date: model.date width: root.dayWidth height: root.hourHeight * 24 @@ -285,6 +286,27 @@ FocusScope { } } + Rectangle { + id: currentTimeLine + anchors { + right: parent.right + left: parent.left + } + y: root.hourHeight * root.currentDate.getHours() + root.hourHeight / 60 * root.currentDate.getMinutes() + height: 2 + color: Kube.Colors.plasmaBlue + visible: root.currentDate.getDate() == dayDelegate.date.getDate() + opacity: 0.8 + } + + //Dimm days in the past + Rectangle { + anchors.fill: parent + color: Kube.Colors.buttonColor + opacity: 0.4 + visible: root.currentDate.getDate() > dayDelegate.date.getDate() + } + DropArea { anchors.fill: parent -- cgit v1.2.3