fix some applets animations flickerring

--especially when the user drags something over
the Latte::View and afterwards drops it
pull/6/head
Michail Vourlakos 6 years ago
parent 58f99c0c55
commit beb0100644

@ -1095,6 +1095,7 @@ bool View::event(QEvent *e)
break;
case QEvent::DragLeave:
case QEvent::Drop:
setContainsDrag(false);
break;

@ -171,11 +171,24 @@ Item {
movingForResize = false;
return;
}
translation.x = oldX - x
translation.y = oldY - y
if (!root.isVertical) {
translation.x = oldX - x;
translation.y = 0;
} else {
translation.y = oldY - y;
translation.x = 0;
}
translAnim.running = true
oldX = x
oldY = y
if (!root.isVertical) {
oldX = x;
oldY = 0;
} else {
oldY = y;
oldX = 0;
}
}
onYChanged: {
@ -186,16 +199,20 @@ Item {
if (!root.isVertical) {
translation.x = oldX - x;
translation.y = 0;
} else {
translation.y = oldY - y;
translation.x = 0;
}
translAnim.running = true;
if (!root.isVertical) {
oldX = x;
oldY = 0;
} else {
oldY = y;
oldX = 0;
}
}

Loading…
Cancel
Save