homescreens/halcyon: Fix overshoot

This commit is contained in:
Devin Lin 2022-06-23 17:02:32 -04:00
parent 213faea679
commit 108daf50db
2 changed files with 8 additions and 6 deletions

View file

@ -35,7 +35,7 @@ GridView {
header: Controls.Control {
implicitWidth: gridView.width
topPadding: PlasmaCore.Units.largeSpacing + Math.round(gridView.height * 0.2)
topPadding: PlasmaCore.Units.largeSpacing + Math.round(gridView.height * 0.25)
bottomPadding: PlasmaCore.Units.largeSpacing
leftPadding: PlasmaCore.Units.smallSpacing

View file

@ -73,12 +73,14 @@ Item {
onVerticalOvershootChanged: {
if (dragging && verticalOvershoot < 0) {
if (!openingSearchWidget) {
openingSearchWidget = true;
root.searchWidget.startGesture();
if (oldVerticalOvershoot === 0) {
openingSearchWidget = true;
root.searchWidget.startGesture();
}
} else {
let offset = -(verticalOvershoot - oldVerticalOvershoot);
root.searchWidget.updateGestureOffset(-offset);
}
let offset = -(verticalOvershoot - oldVerticalOvershoot);
root.searchWidget.updateGestureOffset(-offset);
}
oldVerticalOvershoot = verticalOvershoot;
}