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

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

fix: Nudge down hotseat correctly when no-hint gesture in use

parent ff5c7067
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -150,6 +150,8 @@ public class DeviceProfile {
    private CalculatedCellSpec mResponsiveWorkspaceCellSpec;
    private CalculatedCellSpec mResponsiveAllAppsCellSpec;

    private boolean isNoHintGesture = false;

    /**
     * The maximum amount of left/right workspace padding as a percentage of the screen width.
     * To be clear, this means that up to 7% of the screen width can be used as left padding, and
@@ -443,6 +445,9 @@ public class DeviceProfile {
        isTaskbarPresent = (isTablet || (taskbarOrBubbleBarOnPhones && isGestureMode))
                && wmProxy.isTaskbarDrawnInProcess();

        isNoHintGesture = LineageSettings.System.getInt(
                context.getContentResolver(), LineageSettings.System.NAVIGATION_BAR_HINT, 0) != 1;

        // Some more constants.
        context = getContext(context, info, inv.isFixedLandscape
                        || isVerticalBarLayout()
@@ -2175,7 +2180,8 @@ public class DeviceProfile {
            }

        } else {
            return hotseatBarBottomSpacePx + ((isGestural() ? 1 : 2) * heightDifference);
            return hotseatBarBottomSpacePx +
                    (int) ((isGestural() ? (isNoHintGesture ? -2.5f : 1f) : 2f) * heightDifference);
        }

    }