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

Commit b12ce3d7 authored by Alex Chau's avatar Alex Chau Committed by Automerger Merge Worker
Browse files

Merge "Consider padding when measuring AllApps in SecondaryDragLayer" into...

Merge "Consider padding when measuring AllApps in SecondaryDragLayer" into tm-dev am: 69230bbb am: 6ae7a49f

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



Change-Id: I9f5345027313fe1f41ea74f2856c372e50c92f7f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9cd4f1e2 6ae7a49f
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -120,23 +120,20 @@ public class SecondaryDragLayer extends BaseDragLayer<SecondaryDisplayLauncher>

                int maxWidth =
                        grid.allAppsCellWidthPx * grid.numShownAllAppsColumns + horizontalPadding;
                int appsWidth = Math.min(width, maxWidth);
                int appsWidth = Math.min(width - getPaddingLeft() - getPaddingRight(), maxWidth);

                int maxHeight =
                        grid.allAppsCellHeightPx * grid.numShownAllAppsColumns + verticalPadding;
                int appsHeight = Math.min(height, maxHeight);
                int appsHeight = Math.min(height - getPaddingTop() - getPaddingBottom(), maxHeight);

                mAppsView.measure(
                        makeMeasureSpec(appsWidth, EXACTLY), makeMeasureSpec(appsHeight, EXACTLY));

            } else if (child == mAllAppsButton) {
                int appsButtonSpec = makeMeasureSpec(grid.iconSizePx, EXACTLY);
                mAllAppsButton.measure(appsButtonSpec, appsButtonSpec);

            } else if (child == mWorkspace) {
                measureChildWithMargins(mWorkspace, widthMeasureSpec, 0, heightMeasureSpec,
                        grid.iconSizePx + grid.edgeMarginPx);

            } else {
                measureChildWithMargins(child, widthMeasureSpec, 0, heightMeasureSpec, 0);
            }