Fix app drawer icon scaling when home screen icons are resized (#5932)
* Fix foldable device layout issue on Pixel 9 Pro Fold - Enable two-panel layout for all multi-display devices (foldables) - Previously required both isTablet && isMultiDisplay conditions - Foldable devices may not meet 600dp tablet width threshold when unfolded - This ensures proper layout utilization of available screen space Fixes #5920 * Fix app drawer icon scaling when home screen icons are resized - Prevent home screen icon scale from affecting app drawer layout - When mIsScalableGrid is true, use separate scaling for app drawer elements - This fixes the 'zoomed out' appearance in app drawer when home screen icons are scaled to 120% or higher - App drawer now maintains independent sizing from home screen Fixes #5912 * Remove code comments from fixes - Clean up code by removing explanatory comments - Keep changes minimal and focused
This commit is contained in:
1 parent
d26f627910
commit
a2545ee91e
1 file changed
+5
-4
@@ -378,7 +378,7 @@ public class DeviceProfile {
|
||||
mInfo = info;
|
||||
isTablet = info.isTablet(windowBounds);
|
||||
isPhone = !isTablet;
|
||||
isTwoPanels = isTablet && isMultiDisplay;
|
||||
isTwoPanels = isMultiDisplay;
|
||||
boolean isTaskBarEnabled = PreferenceExtensionsKt.firstBlocking(preferenceManager2.getEnableTaskbarOnPhone());
|
||||
isTaskbarPresent = isTaskBarEnabled && (isTablet || (enableTinyTaskbar() && isGestureMode))
|
||||
&& WindowManagerProxy.INSTANCE.get(context).isTaskbarDrawnInProcess();
|
||||
@@ -1410,9 +1410,10 @@ public class DeviceProfile {
|
||||
* Updates the iconSize for allApps* variants.
|
||||
*/
|
||||
private void updateAllAppsIconSize(float scale, Resources res) {
|
||||
float borderScale = mIsScalableGrid ? 1.0f : scale;
|
||||
allAppsBorderSpacePx = new Point(
|
||||
pxFromDp(inv.allAppsBorderSpaces[mTypeIndex].x, mMetrics, scale),
|
||||
pxFromDp(inv.allAppsBorderSpaces[mTypeIndex].y, mMetrics, scale));
|
||||
pxFromDp(inv.allAppsBorderSpaces[mTypeIndex].x, mMetrics, borderScale),
|
||||
pxFromDp(inv.allAppsBorderSpaces[mTypeIndex].y, mMetrics, borderScale));
|
||||
// AllApps cells don't have real space between cells,
|
||||
// so we add the border space to the cell height
|
||||
allAppsCellHeightPx = pxFromDp(inv.allAppsCellSize[mTypeIndex].y, mMetrics, allAppsCellHeightMultiplier)
|
||||
@@ -1424,7 +1425,7 @@ public class DeviceProfile {
|
||||
allAppsIconTextSizePx = pxFromSp(inv.allAppsIconTextSize[mTypeIndex], mMetrics);
|
||||
allAppsIconTextSizePx *= mTextFactors.getAllAppsIconTextSizeFactor();
|
||||
allAppsIconDrawablePaddingPx = getNormalizedIconDrawablePadding();
|
||||
allAppsCellWidthPx = pxFromDp(inv.allAppsCellSize[mTypeIndex].x, mMetrics, scale);
|
||||
allAppsCellWidthPx = pxFromDp(inv.allAppsCellSize[mTypeIndex].x, mMetrics);
|
||||
|
||||
if (allAppsCellWidthPx < allAppsIconSizePx) {
|
||||
// If allAppsCellWidth no longer fit allAppsIconSize, reduce allAppsBorderSpace
|
||||
|
||||
Reference in new issue
Block a user