summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--views/calendar/qml/View.qml24
1 files changed, 23 insertions, 1 deletions
diff --git a/views/calendar/qml/View.qml b/views/calendar/qml/View.qml
index 0d86313d..213023b6 100644
--- a/views/calendar/qml/View.qml
+++ b/views/calendar/qml/View.qml
@@ -193,11 +193,26 @@ FocusScope {
193 193
194 delegate: Rectangle { 194 delegate: Rectangle {
195 id: eventDelegate 195 id: eventDelegate
196
197 states: [
198 State {
199 name: "dnd"
200 when: mouseArea.drag.active
201
202 PropertyChanges {target: mouseArea; cursorShape: Qt.ClosedHandCursor}
203 PropertyChanges {target: eventDelegate; x: x; y: y}
204 PropertyChanges {target: eventDelegate; parent: root}
205 PropertyChanges {target: eventDelegate; opacity: 0.7}
206 PropertyChanges {target: eventDelegate; anchors.right: ""}
207 PropertyChanges {target: eventDelegate; width: Kube.Units.gridUnit * 7 - Kube.Units.smallSpacing * 2}
208 }
209 ]
210
196 anchors { 211 anchors {
197 right: parent.right 212 right: parent.right
198 rightMargin: Kube.Units.smallSpacing 213 rightMargin: Kube.Units.smallSpacing
199 } 214 }
200 width: parent.width - Kube.Units.smallSpacing * 2 - Kube.Units.gridUnit * model.indention 215 width: Kube.Units.gridUnit * 7 - Kube.Units.smallSpacing * 2 - Kube.Units.gridUnit * model.indention
201 height: Kube.Units.gridUnit * model.duration 216 height: Kube.Units.gridUnit * model.duration
202 y: Kube.Units.gridUnit * model.starts 217 y: Kube.Units.gridUnit * model.starts
203 x: Kube.Units.gridUnit * model.indention 218 x: Kube.Units.gridUnit * model.indention
@@ -215,10 +230,17 @@ FocusScope {
215 color: Kube.Colors.highlightedTextColor 230 color: Kube.Colors.highlightedTextColor
216 } 231 }
217 232
233 Drag.active: mouseArea.drag.active
234 Drag.hotSpot.x: mouseArea.mouseX
235 Drag.hotSpot.y: mouseArea.mouseY
236 Drag.source: eventDelegate
237
218 MouseArea { 238 MouseArea {
239 id: mouseArea
219 anchors.fill: parent 240 anchors.fill: parent
220 241
221 hoverEnabled: true 242 hoverEnabled: true
243 drag.target: parent
222 244
223 onEntered: { 245 onEntered: {
224 eventDelegate.z = eventDelegate.z + 100 246 eventDelegate.z = eventDelegate.z + 100