forked from qt-creator/qt-creator
Timeline: Pass the right dragOffset to CategoryLabels
Also, make sure the category dragger only reacts to vertical mouse movements. Change-Id: Ic53db9030536a1f2d35ea02facb920a4d3f0a005 Task-number: QTCREATORBUG-15333 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -63,6 +63,7 @@ Item {
|
|||||||
cursorShape: dragging ? Qt.ClosedHandCursor : Qt.OpenHandCursor
|
cursorShape: dragging ? Qt.ClosedHandCursor : Qt.OpenHandCursor
|
||||||
drag.minimumY: dragging ? 0 : -dragOffset // Account for parent change below
|
drag.minimumY: dragging ? 0 : -dragOffset // Account for parent change below
|
||||||
drag.maximumY: draggerParent.height - (dragging ? 0 : dragOffset)
|
drag.maximumY: draggerParent.height - (dragging ? 0 : dragOffset)
|
||||||
|
drag.axis: Drag.YAxis
|
||||||
}
|
}
|
||||||
|
|
||||||
DropArea {
|
DropArea {
|
||||||
|
@@ -102,7 +102,7 @@ Flickable {
|
|||||||
draggerParent: categories
|
draggerParent: categories
|
||||||
width: 150
|
width: 150
|
||||||
height: parent.height
|
height: parent.height
|
||||||
dragOffset: parent.y
|
dragOffset: loader.y
|
||||||
|
|
||||||
onDropped: {
|
onDropped: {
|
||||||
categories.moveCategories(sourceIndex, targetIndex);
|
categories.moveCategories(sourceIndex, targetIndex);
|
||||||
|
Reference in New Issue
Block a user