mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
launcher: create more space options
The grid doesn't have a constant space between cells anymore, so we need new attributes for the different spaces in different situations. Bug: 191879424 Test: checking cell size and extra space in dumpsys Change-Id: I4b6aae5b3fea281490c00cd13d0cd3a25372f21b
This commit is contained in:
@@ -422,8 +422,8 @@ public class AppWidgetResizeFrame extends AbstractFloatingView implements View.O
|
||||
*/
|
||||
private void resizeWidgetIfNeeded(boolean onDismiss) {
|
||||
DeviceProfile dp = mLauncher.getDeviceProfile();
|
||||
float xThreshold = mCellLayout.getCellWidth() + dp.cellLayoutBorderSpacingPx;
|
||||
float yThreshold = mCellLayout.getCellHeight() + dp.cellLayoutBorderSpacingPx;
|
||||
float xThreshold = mCellLayout.getCellWidth() + dp.cellLayoutBorderSpacePx.x;
|
||||
float yThreshold = mCellLayout.getCellHeight() + dp.cellLayoutBorderSpacePx.y;
|
||||
|
||||
int hSpanInc = getSpanIncrement((mDeltaX + mDeltaXAddOn) / xThreshold - mRunningHInc);
|
||||
int vSpanInc = getSpanIncrement((mDeltaY + mDeltaYAddOn) / yThreshold - mRunningVInc);
|
||||
@@ -508,8 +508,8 @@ public class AppWidgetResizeFrame extends AbstractFloatingView implements View.O
|
||||
|
||||
private void onTouchUp() {
|
||||
DeviceProfile dp = mLauncher.getDeviceProfile();
|
||||
int xThreshold = mCellLayout.getCellWidth() + dp.cellLayoutBorderSpacingPx;
|
||||
int yThreshold = mCellLayout.getCellHeight() + dp.cellLayoutBorderSpacingPx;
|
||||
int xThreshold = mCellLayout.getCellWidth() + dp.cellLayoutBorderSpacePx.x;
|
||||
int yThreshold = mCellLayout.getCellHeight() + dp.cellLayoutBorderSpacePx.y;
|
||||
|
||||
mDeltaXAddOn = mRunningHInc * xThreshold;
|
||||
mDeltaYAddOn = mRunningVInc * yThreshold;
|
||||
|
||||
Reference in New Issue
Block a user