Changeset View
Changeset View
Standalone View
Standalone View
containments/panel/contents/ui/ConfigOverlay.qml
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | 70 | if (pressed) { | |||
---|---|---|---|---|---|
98 | 98 | | |||
99 | var padding = units.gridUnit * 3; | 99 | var padding = units.gridUnit * 3; | ||
100 | if (currentApplet && (mouse.x < -padding || mouse.y < -padding || | 100 | if (currentApplet && (mouse.x < -padding || mouse.y < -padding || | ||
101 | mouse.x > width + padding || mouse.y > height + padding)) { | 101 | mouse.x > width + padding || mouse.y > height + padding)) { | ||
102 | var newCont = plasmoid.containmentAt(mouse.x, mouse.y); | 102 | var newCont = plasmoid.containmentAt(mouse.x, mouse.y); | ||
103 | 103 | | |||
104 | if (newCont && newCont !== plasmoid) { | 104 | if (newCont && newCont !== plasmoid) { | ||
105 | var newPos = newCont.mapFromApplet(plasmoid, mouse.x, mouse.y); | 105 | var newPos = newCont.mapFromApplet(plasmoid, mouse.x, mouse.y); | ||
106 | newCont.addApplet(currentApplet.applet, newPos.x, newPos.y); | 106 | var applet = currentApplet.applet; | ||
107 | root.dragOverlay.currentApplet = null; | 107 | currentApplet.destroy(); | ||
108 | newCont.addApplet(applet, newPos.x, newPos.y); | ||||
108 | return; | 109 | return; | ||
109 | } | 110 | } | ||
110 | } | 111 | } | ||
111 | 112 | | |||
112 | if (plasmoid.formFactor === PlasmaCore.Types.Vertical) { | 113 | if (plasmoid.formFactor === PlasmaCore.Types.Vertical) { | ||
113 | currentApplet.y += (mouse.y - lastY); | 114 | currentApplet.y += (mouse.y - lastY); | ||
114 | handle.y = currentApplet.y; | 115 | handle.y = currentApplet.y; | ||
115 | } else { | 116 | } else { | ||
▲ Show 20 Lines • Show All 297 Lines • Show Last 20 Lines |