mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Merge "Scale widgets when dragging and dropping in multi-window mode." into ub-launcher3-master
This commit is contained in:
committed by
Android (Google) Code Review
commit
72169102db
@@ -3461,14 +3461,14 @@ public class Workspace extends PagedView
|
||||
mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(layout, loc, true);
|
||||
resetTransitionTransform(layout);
|
||||
|
||||
float dragViewScaleX;
|
||||
float dragViewScaleY;
|
||||
float dragViewScaleX = 1f;
|
||||
float dragViewScaleY = 1f;
|
||||
if (scale) {
|
||||
dragViewScaleX = (1.0f * r.width()) / dragView.getMeasuredWidth();
|
||||
dragViewScaleY = (1.0f * r.height()) / dragView.getMeasuredHeight();
|
||||
} else {
|
||||
dragViewScaleX = 1f;
|
||||
dragViewScaleY = 1f;
|
||||
float width = info.spanX * layout.mCellWidth;
|
||||
float height = info.spanY * layout.mCellHeight;
|
||||
|
||||
dragViewScaleX = r.width() / width;
|
||||
dragViewScaleY = r.height() / height;
|
||||
}
|
||||
|
||||
// The animation will scale the dragView about its center, so we need to center about
|
||||
|
||||
Reference in New Issue
Block a user