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

Commit 94c9ef2f authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

feat: Fix hotseat when there's no navbar hint

parent 88e5a0ec
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1941,13 +1941,20 @@ public class DeviceProfile {
            float workspaceCellWidth = (float) widthPx / inv.numColumns;
            float hotseatCellWidth = (float) widthPx / numShownHotseatIcons;
            int hotseatAdjustment = Math.round((workspaceCellWidth - hotseatCellWidth) / 2);

            WindowManagerProxy wm = WindowManagerProxy.newInstance(context);
            boolean isFullyGesture = wm.getNavigationMode(context) == NavigationMode.NO_BUTTON;
            boolean noHint = isFullyGesture && LineageSettings.System.getInt(
                    context.getContentResolver(), LineageSettings.System.NAVIGATION_BAR_HINT, 0) != 1;

            hotseatBarPadding.set(
                    hotseatAdjustment + workspacePadding.left + cellLayoutPaddingPx.left
                            + mInsets.left,
                    0,
                    noHint ? (hotseatBarSizePx - hotseatCellHeightPx) / 2 : 0,
                    hotseatAdjustment + workspacePadding.right + cellLayoutPaddingPx.right
                            + mInsets.right,
                    getHotseatBarBottomPadding());
                    noHint ? getHotseatBarBottomPadding() - (getHotseatBarBottomPadding() / 2)
                            : getHotseatBarBottomPadding());
        }
        return hotseatBarPadding;
    }