on xenial help sign in
calling flick() onCompleted to correctly position the view.
commitd9a825314556bc5989aae767f47cb88fedaa4367 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 25 Jun 2013, 15:25 (13 years ago) parent853c347
1 file changed+9
Launcher/LauncherPanel.qml+9
Launcher/LauncherPanel.qml+9
@@ -117,6 +117,15 @@ Item {
117117 property int foldingAreaHeight: itemSize * 0.75
118118 property int itemSize: width
119119
120+ Component.onCompleted: {
121+ // This is needed because snapping would partially fold
122+ // the first item on initialisation. This can only be
123+ // overridden by mouse interactions - which is what flick()
124+ // simulates. Setting contentY to 0 would not work because
125+ // of this.
126+ flick(0, units.gu(20))
127+ }
128+
120129 delegate: LauncherDelegate {
121130 id: launcherDelegate
122131 objectName: "launcherDelegate" + index