diff options
Diffstat (limited to 'views/calendar/qml/WeekView.qml')
-rw-r--r-- | views/calendar/qml/WeekView.qml | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/views/calendar/qml/WeekView.qml b/views/calendar/qml/WeekView.qml index f78a4a8d..484a151f 100644 --- a/views/calendar/qml/WeekView.qml +++ b/views/calendar/qml/WeekView.qml | |||
@@ -59,34 +59,14 @@ FocusScope { | |||
59 | width: root.dayWidth * root.daysToShow + Kube.Units.gridUnit * 2 | 59 | width: root.dayWidth * root.daysToShow + Kube.Units.gridUnit * 2 |
60 | height: root.height | 60 | height: root.height |
61 | 61 | ||
62 | //BEGIN day labels | 62 | DayLabels { |
63 | Row { | ||
64 | id: dayLabels | 63 | id: dayLabels |
65 | anchors.top: parent.top | 64 | anchors.top: parent.top |
66 | anchors.right: parent.right | 65 | anchors.right: parent.right |
67 | spacing: 0 | 66 | startDate: root.startDate |
68 | height: childrenRect.height | 67 | dayWidth: root.dayWidth |
69 | width: root.dayWidth * root.daysToShow | 68 | daysToShow: root.daysToShow |
70 | Repeater { | ||
71 | model: root.daysToShow | ||
72 | delegate: Item { | ||
73 | width: root.dayWidth | ||
74 | height: Kube.Units.gridUnit + Kube.Units.smallSpacing * 3 | ||
75 | Kube.Label { | ||
76 | function addDaysToDate(date, days) { | ||
77 | var date = new Date(date); | ||
78 | date.setDate(date.getDate() + days); | ||
79 | return date; | ||
80 | } | ||
81 | font.bold: true | ||
82 | |||
83 | anchors.centerIn: parent | ||
84 | text: addDaysToDate(root.startDate, modelData).toLocaleString(Qt.locale(), "dddd") | ||
85 | } | ||
86 | } | ||
87 | } | ||
88 | } | 69 | } |
89 | //END day labels | ||
90 | 70 | ||
91 | //BEGIN daylong events | 71 | //BEGIN daylong events |
92 | Rectangle { | 72 | Rectangle { |