Commit 96348c2d authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Drag and drop hotspot now follows cursor rather than parent incidence...

Drag and drop hotspot now follows cursor rather than parent incidence rectangle top-left corner. Fixes #77
parent c8328c6f
Pipeline #99403 failed with stage
in 9 minutes and 22 seconds
......@@ -305,8 +305,6 @@ Item {
openOccurrenceId: root.openOccurrence ? root.openOccurrence.incidenceId : ""
isDark: root.isDark
Drag.active: mouseArea.drag.active
states: [
State {
when: incidenceDelegate.mouseArea.drag.active
......
......@@ -61,6 +61,10 @@ Rectangle {
property real caughtX: 0
property real caughtY: 0
Drag.active: mouseArea.drag.active
Drag.hotSpot.x: mouseArea.mouseX
Drag.hotSpot.y: mouseArea.mouseY
IncidenceBackground {
id: incidenceBackground
isOpenOccurrence: parent.isOpenOccurrence
......
......@@ -378,6 +378,10 @@ Kirigami.Page {
property real caughtX: 0
property real caughtY: 0
Drag.active: mouseArea.drag.active
Drag.hotSpot.x: mouseArea.mouseX
Drag.hotSpot.y: mouseArea.mouseY
Layout.fillWidth: true
topPadding: paddingSize
bottomPadding: paddingSize
......@@ -408,8 +412,6 @@ Kirigami.Page {
}
}
Drag.active: mouseArea.drag.active
states: [
State {
when: incidenceCard.mouseArea.drag.active
......
......@@ -477,8 +477,6 @@ Kirigami.Page {
isDark: root.isDark
reactToCurrentMonth: false
Drag.active: mouseArea.drag.active
states: [
State {
when: incidenceDelegate.mouseArea.drag.active
......@@ -791,6 +789,10 @@ Kirigami.Page {
property real caughtX: 0
property real caughtY: 0
Drag.active: mouseArea.drag.active
Drag.hotSpot.x: mouseArea.mouseX
Drag.hotSpot.y: mouseArea.mouseY
// Drag reposition animations -- when the incidence goes to the correct cell of the monthgrid
Behavior on x {
enabled: repositionAnimationEnabled
......@@ -909,8 +911,6 @@ Kirigami.Page {
onTodoCompletedClicked: completeTodo(incidencePtr)
onAddSubTodoClicked: root.addSubTodo(parentWrapper)
}
Drag.active: mouseArea.drag.active
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment