summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-01 21:35:19 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-01 21:35:19 +0200
commit80b2b357f2197dee80025d30a9ef01442bccf66b (patch)
treed5ca974f928c8305c63f35b73c1fcccbdea25494
parenta18d3efd4f54885af3755c89ae5a44839549d5f2 (diff)
downloadkube-80b2b357f2197dee80025d30a9ef01442bccf66b.tar.gz
kube-80b2b357f2197dee80025d30a9ef01442bccf66b.zip
Cleanup
-rw-r--r--views/calendar/qml/WeekView.qml19
1 files 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 {
48 48
49 property date startDate: getMonday(currentDate) 49 property date startDate: getMonday(currentDate)
50 50
51 function addDaysToDate(date, days) {
52 var date = new Date(date);
53 date.setDate(date.getDate() + days);
54 return date;
55 }
56
57 Item { 51 Item {
58 anchors { 52 anchors {
59 top: parent.top 53 top: parent.top
@@ -74,14 +68,17 @@ FocusScope {
74 width: root.dayWidth * root.daysToShow 68 width: root.dayWidth * root.daysToShow
75 Repeater { 69 Repeater {
76 model: root.daysToShow 70 model: root.daysToShow
77 71 delegate: Item {
78 delegate: Rectangle {
79 width: root.dayWidth 72 width: root.dayWidth
80 height: Kube.Units.gridUnit + Kube.Units.smallSpacing * 3 73 height: Kube.Units.gridUnit + Kube.Units.smallSpacing * 3
81
82 color: "yellow"
83
84 Kube.Label { 74 Kube.Label {
75 function addDaysToDate(date, days) {
76 var date = new Date(date);
77 date.setDate(date.getDate() + days);
78 return date;
79 }
80 font.bold: true
81
85 anchors.centerIn: parent 82 anchors.centerIn: parent
86 text: addDaysToDate(root.startDate, modelData).toLocaleString(Qt.locale(), "dddd") 83 text: addDaysToDate(root.startDate, modelData).toLocaleString(Qt.locale(), "dddd")
87 } 84 }