Update where responsive grid cell icon size is defined
This CL changes where the cell icon size, text size and drawable padding is defined to prevent an issue with taskbar. The transient taskbar updates the DeviceProfile icon size with a different value than used for responsive grids, and this update wasn't working anymore because responsive grid implementation wasn't reading the value from iconSize inside the updateIconSize function, but from the responsive grid spec. Bug: 313463280 Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD Test: manual Test: NexusLauncherImageTests Change-Id: I835a90d724c2d1b2d32f483b758b789be7cbdcfe
This commit is contained in:
1 parent
4a6d4994c3
commit
15cacd54c6
1 file changed
+3
-4
@@ -1002,6 +1002,9 @@ public class DeviceProfile {
|
||||
iconCenterVertically = mIsScalableGrid || mIsResponsiveGrid;
|
||||
|
||||
if (mIsResponsiveGrid) {
|
||||
iconSizePx = mResponsiveWorkspaceCellSpec.getIconSize();
|
||||
iconTextSizePx = mResponsiveWorkspaceCellSpec.getIconTextSize();
|
||||
mIconDrawablePaddingOriginalPx = mResponsiveWorkspaceCellSpec.getIconDrawablePadding();
|
||||
updateIconSize(1f, res);
|
||||
updateWorkspacePadding();
|
||||
return 0;
|
||||
@@ -1096,10 +1099,6 @@ public class DeviceProfile {
|
||||
cellLayoutBorderSpacePx = getCellLayoutBorderSpace(inv, scale);
|
||||
|
||||
if (mIsResponsiveGrid) {
|
||||
iconSizePx = mResponsiveWorkspaceCellSpec.getIconSize();
|
||||
iconTextSizePx = mResponsiveWorkspaceCellSpec.getIconTextSize();
|
||||
mIconDrawablePaddingOriginalPx = mResponsiveWorkspaceCellSpec.getIconDrawablePadding();
|
||||
|
||||
cellWidthPx = mResponsiveWorkspaceWidthSpec.getCellSizePx();
|
||||
cellHeightPx = mResponsiveWorkspaceHeightSpec.getCellSizePx();
|
||||
|
||||
|
||||
Reference in new issue
Block a user