Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/package/contents/ui/SideBarSection.qml
Show All 29 Lines | 25 | DropArea { | |||
---|---|---|---|---|---|
30 | 30 | | |||
31 | anchors.horizontalCenter: parent.horizontalCenter | 31 | anchors.horizontalCenter: parent.horizontalCenter | ||
32 | 32 | | |||
33 | property int contentHeight: model ? (model.count * units.iconSizes.medium) + ((model.count - 1) * flow.spacing) : 0 | 33 | property int contentHeight: model ? (model.count * units.iconSizes.medium) + ((model.count - 1) * flow.spacing) : 0 | ||
34 | 34 | | |||
35 | property alias model: repeater.model | 35 | property alias model: repeater.model | ||
36 | property alias usesPlasmaTheme: repeater.usesPlasmaTheme | 36 | property alias usesPlasmaTheme: repeater.usesPlasmaTheme | ||
37 | 37 | | |||
38 | onDragMove: { | 38 | onDragMove: event => { | ||
39 | if (flow.animating) { | 39 | if (flow.animating) { | ||
40 | return; | 40 | return; | ||
41 | } | 41 | } | ||
42 | 42 | | |||
43 | var above = flow.childAt(event.x, event.y); | 43 | var above = flow.childAt(event.x, event.y); | ||
44 | 44 | | |||
45 | if (above && above !== kicker.dragSource && dragSource.parent == flow) { | 45 | if (above && above !== kicker.dragSource && dragSource.parent == flow) { | ||
46 | repeater.model.moveRow(dragSource.itemIndex, above.itemIndex); | 46 | repeater.model.moveRow(dragSource.itemIndex, above.itemIndex); | ||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |