mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
homescreens/halcyon: Prevent search widget from being opened from dragging down and up
This commit is contained in:
parent
32bd414b9e
commit
8112387253
1 changed files with 5 additions and 2 deletions
|
|
@ -30,10 +30,11 @@ MobileShell.GridView {
|
|||
|
||||
// search widget open gesture
|
||||
property bool openingSearchWidget: false
|
||||
property bool canOpenSearchWidget: false
|
||||
property real oldVerticalOvershoot: verticalOvershoot
|
||||
|
||||
onVerticalOvershootChanged: {
|
||||
if (dragging && verticalOvershoot < 0) {
|
||||
if (dragging && canOpenSearchWidget && verticalOvershoot < 0) {
|
||||
if (!openingSearchWidget) {
|
||||
if (oldVerticalOvershoot === 0) {
|
||||
openingSearchWidget = true;
|
||||
|
|
@ -47,7 +48,9 @@ MobileShell.GridView {
|
|||
oldVerticalOvershoot = verticalOvershoot;
|
||||
}
|
||||
onDraggingChanged: {
|
||||
if (!dragging && openingSearchWidget) {
|
||||
if (dragging) {
|
||||
canOpenSearchWidget = root.contentY <= 0;
|
||||
} else if (!dragging && openingSearchWidget) {
|
||||
openingSearchWidget = false;
|
||||
root.searchWidget.endGesture();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue