From 61fb6decdff4dabde278bb65151d9172a5ca5a86 Mon Sep 17 00:00:00 2001 From: Branden Ghena Date: Sun, 28 Jun 2026 00:40:53 -0500 Subject: [PATCH] fix: align home screen icons based on text size (#6921) * Align icons based on text size * chore: Apply suggestions --------- Co-authored-by: Pun Butrach --- src/com/android/launcher3/DeviceProfile.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index c7a3c50d1b..74c16a0594 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -1201,6 +1201,10 @@ public class DeviceProfile { final boolean isVerticalLayout = isVerticalBarLayout(); cellLayoutBorderSpacePx = getCellLayoutBorderSpace(inv, scale); + // Lawnchair: Get initial text size before calculating layout + // This scales offset with text sizing, all the way down to zero + iconTextSizePx *= mTextFactors.getIconTextSizeFactor(); + if (mIsResponsiveGrid) { cellWidthPx = mResponsiveWorkspaceWidthSpec.getCellSizePx(); cellHeightPx = mResponsiveWorkspaceHeightSpec.getCellSizePx(); @@ -1314,8 +1318,6 @@ public class DeviceProfile { } } - iconTextSizePx *= mTextFactors.getIconTextSizeFactor(); - // All apps if (mIsResponsiveGrid) { mAllAppsProfile = AllAppsProfile.Factory.createAllAppsWithResponsive(