From 80b2b357f2197dee80025d30a9ef01442bccf66b Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 1 Aug 2018 21:35:19 +0200 Subject: Cleanup --- views/calendar/qml/WeekView.qml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/views/calendar/qml/WeekView.qml b/views/calendar/qml/WeekView.qml index 73436bc9..fb49e8e0 100644 --- a/views/calendar/qml/WeekView.qml +++ b/views/calendar/qml/WeekView.qml @@ -48,12 +48,6 @@ FocusScope { property date startDate: getMonday(currentDate) - function addDaysToDate(date, days) { - var date = new Date(date); - date.setDate(date.getDate() + days); - return date; - } - Item { anchors { top: parent.top @@ -74,14 +68,17 @@ FocusScope { width: root.dayWidth * root.daysToShow Repeater { model: root.daysToShow - - delegate: Rectangle { + delegate: Item { width: root.dayWidth height: Kube.Units.gridUnit + Kube.Units.smallSpacing * 3 - - color: "yellow" - Kube.Label { + function addDaysToDate(date, days) { + var date = new Date(date); + date.setDate(date.getDate() + days); + return date; + } + font.bold: true + anchors.centerIn: parent text: addDaysToDate(root.startDate, modelData).toLocaleString(Qt.locale(), "dddd") } -- cgit v1.2.3