mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Use the icon bounds for all calculations.
- Fixes a drag and drop issue when the dynamic grid scales icons down, due to the drawable bounds not being equal to their bitmap sizes. Change-Id: If7c68b51131de7bac3195a2619e22340f7789432
This commit is contained in:
@@ -2536,8 +2536,9 @@ public class Workspace extends SmoothPagedView
|
||||
icon.clearPressedOrFocusedBackground();
|
||||
}
|
||||
|
||||
mDragController.startDrag(b, dragLayerX, dragLayerY, source, child.getTag(),
|
||||
DragView dv = mDragController.startDrag(b, dragLayerX, dragLayerY, source, child.getTag(),
|
||||
DragController.DRAG_ACTION_MOVE, dragVisualizeOffset, dragRect, scale);
|
||||
dv.setIntrinsicIconScaleFactor(source.getIntrinsicIconScaleFactor());
|
||||
|
||||
if (child.getParent() instanceof ShortcutAndWidgetContainer) {
|
||||
mDragSourceInternal = (ShortcutAndWidgetContainer) child.getParent();
|
||||
@@ -4140,6 +4141,11 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getIntrinsicIconScaleFactor() {
|
||||
return 1f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFlingToDelete() {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user