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

Commit 75e5931c authored by Chris Crump's avatar Chris Crump Committed by Michael Bestas
Browse files

Launcher3: Retrieve the searchbar padding from device profile

Use device profile to get the desired padding

Change-Id: I3f6e058fae48ebcde46e223e9ab7546a08877083
parent b437b80f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -104,9 +104,9 @@ public class AppsSearchContainerLayout extends ExtendedEditText
        // Update the width to match the grid padding
        DeviceProfile dp = mLauncher.getDeviceProfile();
        int myRequestedWidth = getSize(widthMeasureSpec);
        int rowWidth = myRequestedWidth - mAppsView.getActiveRecyclerView().getPaddingLeft()
                - mAppsView.getActiveRecyclerView().getPaddingRight();

        int leftRightPadding = dp.desiredWorkspaceLeftRightMarginPx
                + dp.cellLayoutPaddingLeftRightPx;
        int rowWidth = myRequestedWidth - leftRightPadding * 2;
        int cellWidth = DeviceProfile.calculateCellWidth(rowWidth, dp.inv.numHotseatIcons);
        int iconVisibleSize = Math.round(ICON_VISIBLE_AREA_FACTOR * dp.iconSizePx);
        int iconPadding = cellWidth - iconVisibleSize;