mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
Folio: Settings Component Bugfix
Fixes a bug where if one presses and holds the home screen to bring up the settings component, then swipes up to access the application drawer while the settings component open animation is playing, both the drawer and settings component will be visible on screen at the same time. Fixing this was achieved by setting swipe state back to none whenever the settings component is opening and a onSwipeMove event happens. Video of the bug. 
This commit is contained in:
parent
9c2e2c7db3
commit
a452bc3030
3 changed files with 11 additions and 0 deletions
|
|
@ -971,6 +971,11 @@ void HomeScreenState::swipeEnded()
|
|||
setSwipeState(SwipeState::None);
|
||||
}
|
||||
|
||||
void HomeScreenState::swipeCancelled()
|
||||
{
|
||||
setSwipeState(SwipeState::None);
|
||||
}
|
||||
|
||||
void HomeScreenState::swipeMoved(qreal totalDeltaX, qreal totalDeltaY, qreal deltaX, qreal deltaY)
|
||||
{
|
||||
m_movingUp = deltaY > 0;
|
||||
|
|
|
|||
|
|
@ -341,6 +341,7 @@ public Q_SLOTS:
|
|||
// from SwipeArea
|
||||
void swipeStarted(qreal deltaX, qreal deltaY);
|
||||
void swipeEnded();
|
||||
void swipeCancelled();
|
||||
void swipeMoved(qreal totalDeltaX, qreal totalDeltaY, qreal deltaX, qreal deltaY);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -121,6 +121,11 @@ Item {
|
|||
homeScreenState.swipeEnded();
|
||||
}
|
||||
onSwipeMove: (totalDeltaX, totalDeltaY, deltaX, deltaY) => {
|
||||
// cancel swipe when settings component is opening to prevent conflicts
|
||||
if (folio.HomeScreenState.settingsOpenProgress && folio.HomeScreenState.viewState !== Folio.HomeScreenState.SettingsView) {
|
||||
homeScreenState.swipeCancelled();
|
||||
return;
|
||||
}
|
||||
homeScreenState.swipeMoved(totalDeltaX, totalDeltaY, deltaX, deltaY);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue