Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86d80936 authored by Jonathan Miranda's avatar Jonathan Miranda Committed by Automerger Merge Worker
Browse files

Merge "Update extra space allocations for taller devices." into sc-dev am: dd16ecbc

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

Change-Id: I8fe398bacbdc11a3ba6d43829c1be75248249740
parents 2d96b8b1 dd16ecbc
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -425,14 +425,15 @@ public class DeviceProfile {

                // For devices with more extra space, we take a larger piece from each cell.
                int piece = extraSpace < Utilities.dpToPx(TALL_DEVICE_MORE_EXTRA_SPACE_THRESHOLD_DP)
                        ? 5 : 3;
                        ? 7 : 5;

                int extraSpace = ((getCellSize().y - iconSizePx - iconDrawablePaddingPx * 2)
                        * inv.numRows) / piece;

                int halfExtraSpace = extraSpace / 2;
                hotseatBarTopPaddingPx += halfExtraSpace;
                hotseatBarSizeExtraSpacePx = halfExtraSpace;
                workspaceTopPadding = extraSpace / 8;
                int halfLeftOver = (extraSpace - workspaceTopPadding) / 2;
                hotseatBarTopPaddingPx += halfLeftOver;
                hotseatBarSizeExtraSpacePx = halfLeftOver;
            } else {
                // ie. For a display with a large aspect ratio, we can keep the icons on the
                // workspace in portrait mode closer together by adding more height to the hotseat.