Merge "Polish folder icon bugs." into sc-dev am: 835fab2305 am: 81a9fb9fe3

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15046894

Change-Id: Ia680af59bb5ec24203f6e61ee562c4907a4dbde1
This commit is contained in:
Jonathan Miranda
2021-06-22 22:34:55 +00:00
committed by Automerger Merge Worker
5 changed files with 8 additions and 16 deletions
@@ -138,12 +138,14 @@ public class ShortcutAndWidgetContainer extends ViewGroup implements FolderIcon.
mBorderSpacing, null);
// Center the icon/folder
int cHeight = getCellContentHeight();
int cellPaddingY = (int) Math.max(0, ((lp.height - cHeight) / 2f));
int cellPaddingY = dp.isScalableGrid && mContainerType == WORKSPACE
? dp.cellYPaddingPx
: (int) Math.max(0, ((lp.height - cHeight) / 2f));
// No need to add padding when cell layout border spacing is present.
boolean noPadding = (dp.cellLayoutBorderSpacingPx > 0 && mContainerType == WORKSPACE)
boolean noPaddingX = (dp.cellLayoutBorderSpacingPx > 0 && mContainerType == WORKSPACE)
|| (dp.folderCellLayoutBorderSpacingPx > 0 && mContainerType == FOLDER);
int cellPaddingX = noPadding
int cellPaddingX = noPaddingX
? 0
: mContainerType == WORKSPACE
? dp.workspaceCellPaddingXPx