reset position when launched

This commit is contained in:
Marco Martin 2020-07-16 14:51:58 +02:00
parent e4014bd0ba
commit cbdb6b6f05
2 changed files with 7 additions and 1 deletions

View file

@ -39,6 +39,8 @@ LauncherContainer {
readonly property int cellHeight: availableCellHeight readonly property int cellHeight: availableCellHeight
launcherGrid: root launcherGrid: root
signal launched
frame.width: width frame.width: width
Repeater { Repeater {
@ -74,6 +76,7 @@ LauncherContainer {
delegate.iconItem.Kirigami.ScenePosition.y + delegate.iconItem.height/2, delegate.iconItem.Kirigami.ScenePosition.y + delegate.iconItem.height/2,
Math.min(delegate.iconItem.width, delegate.iconItem.height) Math.min(delegate.iconItem.width, delegate.iconItem.height)
)}); )});
root.launched();
} }
onParentFromLocationChanged: { onParentFromLocationChanged: {
if (!launcherDragManager.active && parent != parentFromLocation) { if (!launcherDragManager.active && parent != parentFromLocation) {

View file

@ -265,7 +265,10 @@ Item {
left: parent.left left: parent.left
right: parent.right right: parent.right
} }
onLaunched: {
scrollAnim.to = 0;
scrollAnim.restart();
}
favoriteStrip: favoriteStrip favoriteStrip: favoriteStrip
appletsLayout: appletsLayout appletsLayout: appletsLayout
} }