animate tasks during dragging

--finally I found why moveDisplaced wasnt
working correctly during dragging!!! ;)
enjoy moving your launchers!!!
pull/1/head
Michail Vourlakos 8 years ago
parent 364e3bb9be
commit 263e21a961

@ -44,7 +44,7 @@ Item {
id: ignoreItemTimer id: ignoreItemTimer
repeat: false repeat: false
interval: 750 interval: 200
onTriggered: { onTriggered: {
ignoredItem = null; ignoredItem = null;
@ -122,7 +122,7 @@ Item {
&& above.m.IsLauncher !== true && above == ignoredItem) { && above.m.IsLauncher !== true && above == ignoredItem) {
return; return;
} else { } else {
ignoredItem = null; //ignoredItem = null;
} }
//at some point it was needed the following && above != ignoredItem //at some point it was needed the following && above != ignoredItem
@ -134,6 +134,7 @@ Item {
if (root.dragSource != above && root.dragSource.itemIndex != insertAt) { if (root.dragSource != above && root.dragSource.itemIndex != insertAt) {
// console.log(root.dragSource.itemIndex + " - "+insertAt); // console.log(root.dragSource.itemIndex + " - "+insertAt);
root.dragSource.z = 100;
tasksModel.move(root.dragSource.itemIndex, insertAt); tasksModel.move(root.dragSource.itemIndex, insertAt);
ignoredItem = above; ignoredItem = above;
ignoreItemTimer.restart(); ignoreItemTimer.restart();

@ -774,7 +774,7 @@ Item {
property bool delayingRemoval: false property bool delayingRemoval: false
property bool directRender: false property bool directRender: false
onTasksCountChanged: updateImplicits(); // onTasksCountChanged: updateImplicits();
// property int count: children ? children.length : 0 // property int count: children ? children.length : 0
/* anchors.bottom: (root.position === PlasmaCore.Types.BottomPositioned) ? parent.bottom : undefined /* anchors.bottom: (root.position === PlasmaCore.Types.BottomPositioned) ? parent.bottom : undefined
@ -785,19 +785,19 @@ Item {
anchors.horizontalCenter: !root.vertical ? parent.horizontalCenter : undefined anchors.horizontalCenter: !root.vertical ? parent.horizontalCenter : undefined
anchors.verticalCenter: root.vertical ? parent.verticalCenter : undefined */ anchors.verticalCenter: root.vertical ? parent.verticalCenter : undefined */
width: contentWidth width: !root.vertical ? contentWidth : mouseHandler.maxSize
height: contentHeight height: root.vertical ? contentHeight : mouseHandler.maxSize
orientation: Qt.Horizontal orientation: Qt.Horizontal
delegate: TaskDelegate{} delegate: TaskDelegate{}
/*Rectangle{ /* Rectangle{
anchors.fill: parent anchors.fill: parent
border.width: 1 border.width: 1
border.color: "red" border.color: "red"
color: "transparent" color: "transparent"
}*/ } */
//the duration of this animation should be as small as possible //the duration of this animation should be as small as possible
//it fixes a small issue with the dragging an item to change it's //it fixes a small issue with the dragging an item to change it's
@ -1128,6 +1128,7 @@ Item {
} }
function resetDragSource() { function resetDragSource() {
dragSource.z = 0;
dragSource = null; dragSource = null;
} }

Loading…
Cancel
Save