smoothen up glitches inConfigureApplets mode

pull/15/head
Michail Vourlakos 5 years ago
parent 2ebe0d0b63
commit 344a7b7f53

@ -294,11 +294,23 @@ Item {
property int oldY: y
onXChanged: {
if (!foreDropArea.visible || movingForResize || !root.dragInfo.entered) {
if (root.isVertical) {
return;
}
if (movingForResize) {
movingForResize = false;
return;
}
var draggingAppletInConfigure = root.dragOverlay && root.dragOverlay.currentApplet;
var isCurrentAppletInDragging = draggingAppletInConfigure && (root.dragOverlay.currentApplet === appletItem);
var dropApplet = root.dragInfo.entered && foreDropArea.visible
if (isCurrentAppletInDragging || !draggingAppletInConfigure && !dropApplet) {
return;
}
if (!root.isVertical) {
translation.x = oldX - x;
translation.y = 0;
@ -319,11 +331,22 @@ Item {
}
onYChanged: {
if (!foreDropArea.visible || movingForResize || !root.dragInfo.entered) {
if (root.isHorizontal) {
return;
}
if (movingForResize) {
movingForResize = false;
return;
}
var draggingAppletInConfigure = root.dragOverlay && root.dragOverlay.currentApplet;
var isCurrentAppletInDragging = draggingAppletInConfigure && (root.dragOverlay.currentApplet === appletItem);
var dropApplet = root.dragInfo.entered && foreDropArea.visible
if (isCurrentAppletInDragging || !draggingAppletInConfigure && !dropApplet) {
return;
}
if (!root.isVertical) {
translation.x = oldX - x;
translation.y = 0;

@ -397,36 +397,6 @@ MouseArea {
}
Behavior on x {
enabled: !configurationArea.pressed
NumberAnimation {
id: xAnim
duration: animations.duration.large
easing.type: Easing.InOutQuad
}
}
Behavior on y {
id: yAnim
enabled: !configurationArea.pressed
NumberAnimation {
duration: animations.duration.large
easing.type: Easing.InOutQuad
}
}
Behavior on width {
enabled: !configurationArea.pressed
NumberAnimation {
duration: animations.duration.large
easing.type: Easing.InOutQuad
}
}
Behavior on height {
enabled: !configurationArea.pressed
NumberAnimation {
duration: animations.duration.large
easing.type: Easing.InOutQuad
}
}
Behavior on opacity {
NumberAnimation {
duration: animations.duration.large

Loading…
Cancel
Save