mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 18:24:46 +00:00
homescreens/halcyon: Fix overshoot
This commit is contained in:
parent
213faea679
commit
108daf50db
2 changed files with 8 additions and 6 deletions
|
|
@ -35,7 +35,7 @@ GridView {
|
||||||
|
|
||||||
header: Controls.Control {
|
header: Controls.Control {
|
||||||
implicitWidth: gridView.width
|
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
|
bottomPadding: PlasmaCore.Units.largeSpacing
|
||||||
leftPadding: PlasmaCore.Units.smallSpacing
|
leftPadding: PlasmaCore.Units.smallSpacing
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,12 +73,14 @@ Item {
|
||||||
onVerticalOvershootChanged: {
|
onVerticalOvershootChanged: {
|
||||||
if (dragging && verticalOvershoot < 0) {
|
if (dragging && verticalOvershoot < 0) {
|
||||||
if (!openingSearchWidget) {
|
if (!openingSearchWidget) {
|
||||||
openingSearchWidget = true;
|
if (oldVerticalOvershoot === 0) {
|
||||||
root.searchWidget.startGesture();
|
openingSearchWidget = true;
|
||||||
|
root.searchWidget.startGesture();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let offset = -(verticalOvershoot - oldVerticalOvershoot);
|
||||||
|
root.searchWidget.updateGestureOffset(-offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
let offset = -(verticalOvershoot - oldVerticalOvershoot);
|
|
||||||
root.searchWidget.updateGestureOffset(-offset);
|
|
||||||
}
|
}
|
||||||
oldVerticalOvershoot = verticalOvershoot;
|
oldVerticalOvershoot = verticalOvershoot;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue