summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2018-03-01 15:19:28 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2018-03-01 15:19:28 +0100
commitd7fa14de0d4ffc6b0ae9529ea8bf84ede1d519fa (patch)
tree03207b340fa00000e42bf162035c883141a82360 /views
parent6220a14fa325aa5141adc78898f0063a72881972 (diff)
downloadkube-d7fa14de0d4ffc6b0ae9529ea8bf84ede1d519fa.tar.gz
kube-d7fa14de0d4ffc6b0ae9529ea8bf84ede1d519fa.zip
add indention to overlaping events
Diffstat (limited to 'views')
-rw-r--r--views/calendar/qml/View.qml14
-rw-r--r--views/calendar/qml/WeekEvents.qml12
2 files changed, 18 insertions, 8 deletions
diff --git a/views/calendar/qml/View.qml b/views/calendar/qml/View.qml
index 1b72881d..a545f473 100644
--- a/views/calendar/qml/View.qml
+++ b/views/calendar/qml/View.qml
@@ -29,7 +29,6 @@ FocusScope {
29 property var month: Calendar.March 29 property var month: Calendar.March
30 property var year: 2017 30 property var year: 2017
31 31
32
33 Column { 32 Column {
34 anchors.centerIn: parent 33 anchors.centerIn: parent
35 34
@@ -118,10 +117,15 @@ FocusScope {
118 model: parent.events 117 model: parent.events
119 118
120 delegate: Rectangle { 119 delegate: Rectangle {
121 anchors.horizontalCenter: parent.horizontalCenter 120 anchors {
122 width: parent.width - Kube.Units.smallSpacing * 2 121 right: parent.right
123 height: Kube.Units.gridUnit * duration 122 rightMargin: Kube.Units.smallSpacing
124 y: Kube.Units.gridUnit * starts 123 }
124 width: parent.width - Kube.Units.smallSpacing * 2 - Kube.Units.gridUnit * model.indention
125 height: Kube.Units.gridUnit * model.duration
126 y: Kube.Units.gridUnit * model.starts
127 x: Kube.Units.gridUnit * model.indention
128
125 color: model.color 129 color: model.color
126 130
127 Kube.Label { 131 Kube.Label {
diff --git a/views/calendar/qml/WeekEvents.qml b/views/calendar/qml/WeekEvents.qml
index b08c00a5..c8a420e0 100644
--- a/views/calendar/qml/WeekEvents.qml
+++ b/views/calendar/qml/WeekEvents.qml
@@ -8,12 +8,14 @@ ListModel {
8 starts: 1 8 starts: 1
9 duration: 4 9 duration: 4
10 text: "Meeting" 10 text: "Meeting"
11 indention: 0
11 }, 12 },
12 ListElement { 13 ListElement {
13 color: "#134bab" 14 color: "#134bab"
14 starts: 9 15 starts: 9
15 duration: 5 16 duration: 5
16 text: "Sport" 17 text: "Sport"
18 indention: 0
17 } 19 }
18 ] 20 ]
19 } 21 }
@@ -24,6 +26,7 @@ ListModel {
24 starts: 9 26 starts: 9
25 duration: 5 27 duration: 5
26 text: "Sport" 28 text: "Sport"
29 indention: 0
27 } 30 }
28 ] 31 ]
29 } 32 }
@@ -36,6 +39,7 @@ ListModel {
36 color: "#af1a6a" 39 color: "#af1a6a"
37 starts: 1 40 starts: 1
38 duration: 4 41 duration: 4
42 indention: 0
39 text: "Meeting" 43 text: "Meeting"
40 } 44 }
41 ] 45 ]
@@ -43,15 +47,17 @@ ListModel {
43 ListElement { 47 ListElement {
44 events: [ 48 events: [
45 ListElement { 49 ListElement {
46 color: "#af1a6a" 50 color: "#134bab"
47 starts: 3 51 starts: 3
48 duration: 5 52 duration: 5
53 indention: 0
49 text: "Meeting" 54 text: "Meeting"
50 }, 55 },
51 ListElement { 56 ListElement {
52 color: "#af1a6a" 57 color: "#af1a6a"
53 starts: 9 58 starts: 4
54 duration: 4 59 duration: 7
60 indention: 1
55 text: "Meeting2" 61 text: "Meeting2"
56 } 62 }
57 ] 63 ]