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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user