homescreens/folio: Allow app grid overshoot, and fix app drawer opening state

This commit is contained in:
Devin Lin 2023-11-05 09:13:37 -08:00
parent 03adeffb8d
commit a049f07095
4 changed files with 11 additions and 11 deletions

View file

@ -18,16 +18,16 @@ As such, all of the positioning and placement of delegates on the screen are top
- If an app gets uninstalled, the homescreen UI needs to ensure that delegates are updated - If an app gets uninstalled, the homescreen UI needs to ensure that delegates are updated
- BUG: landscape favourites bar duplication when dragging icon from it sometimes - BUG: landscape favourites bar duplication when dragging icon from it sometimes
- BUG: can't insert delegates in-between very well in landscape favourites bar - BUG: can't insert delegates in-between very well in landscape favourites bar
- can make the touch area only the icon? - BUG: drag and drop animation when rejected on a different page
- IMPROVEMENT: can make the touch area only the icon?
- FEATURE: add widget import/export - FEATURE: add widget import/export
- FEATURE: keyboard navigation - FEATURE: keyboard navigation
- FEATURE: touchpad navigation - FEATURE: touchpad navigation
- FEATURE: option to darken wallpaper - FEATURE: option to darken wallpaper
- FEATURE: option to turn off row/column swap - FEATURE: option to turn off row/column swap
- BUG: drag and drop animation when rejected on a different page
- FEATURE: animate homescreen config opening - FEATURE: animate homescreen config opening
- RESTORE app drawer overshoot - RESTORE: app drawer overshoot
- PERFORMANCE: ensure that the widget config overlays are in loaders - PERFORMANCE: ensure that the widget config overlays are in loaders

View file

@ -1050,7 +1050,7 @@ void HomeScreenState::determineSwipeTypeAfterThreshold(qreal totalDeltaX, qreal
break; break;
case ViewState::AppDrawerView: case ViewState::AppDrawerView:
setSwipeState(SwipeState::SwipingAppDrawerGrid); setSwipeState(SwipeState::SwipingAppDrawerGrid);
cancelAppDrawerAnimations(); // don't call cancelAppDrawerAnimations(), so we don't have it half open
case ViewState::FolderView: case ViewState::FolderView:
case ViewState::SettingsView: case ViewState::SettingsView:
// no vertical behaviour in folder or settings view // no vertical behaviour in folder or settings view

View file

@ -34,7 +34,7 @@ MobileShell.GridView {
cellWidth: effectiveContentWidth / Math.min(Math.floor(effectiveContentWidth / (Folio.FolioSettings.delegateIconSize + Kirigami.Units.largeSpacing * 3.5)), 8) cellWidth: effectiveContentWidth / Math.min(Math.floor(effectiveContentWidth / (Folio.FolioSettings.delegateIconSize + Kirigami.Units.largeSpacing * 3.5)), 8)
cellHeight: cellWidth + reservedSpaceForLabel cellHeight: cellWidth + reservedSpaceForLabel
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.DragAndOvershootBounds
readonly property int columns: Math.floor(effectiveContentWidth / cellWidth) readonly property int columns: Math.floor(effectiveContentWidth / cellWidth)
readonly property int rows: Math.ceil(root.count / columns) readonly property int rows: Math.ceil(root.count / columns)
@ -90,8 +90,8 @@ MobileShell.GridView {
Folio.HomeScreenState.startDelegateAppDrawerDrag( Folio.HomeScreenState.startDelegateAppDrawerDrag(
centerX - Folio.HomeScreenState.pageCellWidth / 2, centerX - Folio.HomeScreenState.pageCellWidth / 2,
centerY - Folio.HomeScreenState.pageCellHeight / 2, centerY - Folio.HomeScreenState.pageCellHeight / 2,
delegate.pressPosition.x, delegate.pressPosition.x * (Folio.HomeScreenState.pageCellWidth / root.cellWidth),
delegate.pressPosition.y, delegate.pressPosition.y * (Folio.HomeScreenState.pageCellHeight / root.cellHeight),
model.delegate.application.storageId model.delegate.application.storageId
); );
} }

View file

@ -101,11 +101,11 @@ Item {
interactive: root.interactive && interactive: root.interactive &&
settings.homeScreenInteractive && settings.homeScreenInteractive &&
!appDrawer.flickable.moving && (appDrawer.flickable.contentY <= 10 || // disable the swipe area when we are swiping in the app drawer, and not in drag-and-drop
(appDrawer.flickable.atYBeginning || // disable the swipe area when we are swiping in the app drawer, and not in drag-and-drop
Folio.HomeScreenState.swipeState === Folio.HomeScreenState.AwaitingDraggingDelegate || Folio.HomeScreenState.swipeState === Folio.HomeScreenState.AwaitingDraggingDelegate ||
Folio.HomeScreenState.swipeState === Folio.HomeScreenState.DraggingDelegate || Folio.HomeScreenState.swipeState === Folio.HomeScreenState.DraggingDelegate ||
Folio.HomeScreenState.swipeState === Folio.HomeScreenState.SwipingAppDrawerGrid) Folio.HomeScreenState.swipeState === Folio.HomeScreenState.SwipingAppDrawerGrid ||
Folio.HomeScreenState.viewState !== Folio.HomeScreenState.AppDrawerView)
onSwipeStarted: { onSwipeStarted: {
homeScreenState.swipeStarted(); homeScreenState.swipeStarted();