mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Track shelf rather than app window
Change swipe length to be the height of the shelf rather than the distance to the bottom of the task in recents. The shelf already uses this distance to determine its starting offset, and the window uses it to determine how fast to move. So by setting the distance to the height of the shelf, we effectively make the window move slightly faster and the shelf move directly under your finger. Bug: 109817942 Change-Id: I9b20bbed58cccc6f74aba36000a6ca272f9d554d
This commit is contained in:
@@ -185,7 +185,9 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
|
||||
int hotseatInset = dp.isSeascape() ? targetInsets.left : targetInsets.right;
|
||||
return dp.hotseatBarSizePx + dp.hotseatBarSidePaddingPx + hotseatInset;
|
||||
} else {
|
||||
return dp.heightPx - outRect.rect.bottom;
|
||||
int shelfHeight = dp.hotseatBarSizePx + dp.getInsets().bottom;
|
||||
// Track slightly below the top of the shelf (between top and content).
|
||||
return shelfHeight - dp.edgeMarginPx * 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user