mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Scale widgets when dragging and dropping in multi-window mode.
This change mimics the non-MW mode behavior when dragging and dropping widgets by taking the app widget scale into consideration. This ensures a consistant drag and drop experience between MW mode and non-MW mode. * Uses cell data (cell height/width, spanX/Y) to get the expected widget sizes. * Scales sizes when necessary. Bug: 32176631 Change-Id: Icdaf73ecd89a30e57fe7f405292d793f2d6a3ee8
This commit is contained in:
@@ -1041,7 +1041,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
|
||||
// Offsets due to the size difference between the View and the dragOutline.
|
||||
// There is a size difference to account for the outer blur, which may lie
|
||||
// outside the bounds of the view.
|
||||
top += (v.getHeight() - dragOutline.getHeight()) / 2;
|
||||
top += ((mCellHeight * spanY) - dragOutline.getHeight()) / 2;
|
||||
// We center about the x axis
|
||||
left += ((mCellWidth * spanX) - dragOutline.getWidth()) / 2;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user