diff --git a/containment/package/contents/ui/applet/AppletItem.qml b/containment/package/contents/ui/applet/AppletItem.qml index be1956ecc..20513d9d0 100644 --- a/containment/package/contents/ui/applet/AppletItem.qml +++ b/containment/package/contents/ui/applet/AppletItem.qml @@ -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; diff --git a/containment/package/contents/ui/editmode/ConfigOverlay.qml b/containment/package/contents/ui/editmode/ConfigOverlay.qml index e85220954..4320aaf2c 100644 --- a/containment/package/contents/ui/editmode/ConfigOverlay.qml +++ b/containment/package/contents/ui/editmode/ConfigOverlay.qml @@ -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