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

Commit adb24027 authored by Kshitij's avatar Kshitij Committed by Mohammed Althaf T
Browse files

fix: Improve handling of hotseat size handling on tablets

parent 6066b2aa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -310,8 +310,8 @@
            launcher:allAppsBorderSpaceHorizontal="8"
            launcher:allAppsBorderSpaceVertical="16"
            launcher:allAppsBorderSpaceLandscape="16"
            launcher:hotseatBarBottomSpace="76"
            launcher:hotseatBarBottomSpaceLandscape="40"
            launcher:hotseatBarBottomSpace="16"
            launcher:hotseatBarBottomSpaceLandscape="10"
            launcher:startAlignTaskbar="true"
            launcher:startAlignTaskbarLandscape="true"
            launcher:canBeDefault="true" />
+3 −7
Original line number Diff line number Diff line
@@ -973,7 +973,7 @@ public class DeviceProfile {

        if (!isVerticalBarLayout()) {
            // Have a little space between the inset and the QSB
            if (mInsets.bottom + minQsbMargin > hotseatBarBottomSpace) {
            if (mInsets.bottom + minQsbMargin > hotseatBarBottomSpace && !areNavButtonsInline) {
                int availableSpace = hotseatQsbSpace - (mInsets.bottom - hotseatBarBottomSpace);

                // Only change the spaces if there is space
@@ -993,13 +993,9 @@ public class DeviceProfile {
            }
        }

        if (isTablet) {
            hotseatBarBottomSpacePx /= 4;
        }

        hotseatBarBottomSpacePx += mInfo.cutout.bottom;
        hotseatBarBottomSpacePx += (areNavButtonsInline && FORCE_LAYOUT_ALL_HOTSEAT_ICONS
                ? context.getResources().getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size)
                ? context.getResources().getDimensionPixelSize(R.dimen.taskbar_size)
                : 0);

        // Ensure there is enough space for folder icons, which have a slightly larger radius.
@@ -1344,7 +1340,7 @@ public class DeviceProfile {
            } else {
                cellYPaddingPx = Math.max(0, cellHeightPx - cellContentHeight) / 2;
            }
        } else if (mIsScalableGrid) {
        } else if (mIsScalableGrid && !isTablet) {
            iconDrawablePaddingPx = (int) (getNormalizedIconDrawablePadding() * iconScale);
            cellWidthPx = pxFromDp(inv.minCellSize[mTypeIndex].x, mMetrics, scale);
            cellHeightPx = pxFromDp(inv.minCellSize[mTypeIndex].y, mMetrics, scale);