mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Fix issues with drag and drop from All Apps in non-default grids
=> Also fix the widget tray in these non-default grids, and the external shortcut addition flow. The layout was broken as it was scaling with the icon size. Instead keep it fixed which looks much better, similar to how we maintain all apps. => This also fixes a small jump when dragging shortcuts external to Launcher. issue 154169001 Change-Id: Iad1e3859dd6fedccce9b5c6633e64426a4630c31
This commit is contained in:
@@ -1441,6 +1441,10 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
|
||||
mOutlineProvider = previewProvider;
|
||||
|
||||
if (draggableView == null && child instanceof DraggableView) {
|
||||
draggableView = (DraggableView) child;
|
||||
}
|
||||
|
||||
// The drag bitmap follows the touch point around on the screen
|
||||
final Bitmap b = previewProvider.createDragBitmap();
|
||||
int halfPadding = previewProvider.previewPadding / 2;
|
||||
@@ -1451,12 +1455,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
Point dragVisualizeOffset = null;
|
||||
Rect dragRect = new Rect();
|
||||
|
||||
if (draggableView == null && child instanceof DraggableView) {
|
||||
draggableView = (DraggableView) child;
|
||||
}
|
||||
|
||||
if (draggableView != null) {
|
||||
draggableView.getVisualDragBounds(dragRect);
|
||||
draggableView.getSourceVisualDragBounds(dragRect);
|
||||
dragLayerY += dragRect.top;
|
||||
dragVisualizeOffset = new Point(- halfPadding, halfPadding);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user