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

Verified Commit b9df22c3 authored by Saalim Quadri's avatar Saalim Quadri
Browse files

(fix): Check for portrait before setting Hotseat End Offset

parent 9df4d7fb
Loading
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1061,11 +1061,14 @@ public class DeviceProfile {
          needed in gestural navigation by taskbar and navbar classes. Thus, we decouple them here.
         */

        boolean isPortrait = availableWidthPx < availableHeightPx;

        // The side space should be what is defined in InvariantDeviceProfile
        int dockInlineNavButtonsEndSpacingPx = res.getDimensionPixelSize(inv.inlineNavButtonsEndSpacing);
        int dockHotseatBarEndOffset = 3 * res.getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size)
        int dockHotseatBarEndOffset = (isPortrait ? 0 : (
                3 * res.getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size)
                        + 2 * res.getDimensionPixelSize(R.dimen.taskbar_button_space_inbetween)
                + dockInlineNavButtonsEndSpacingPx;
                        + dockInlineNavButtonsEndSpacingPx));
        int sideSpacePx = dockInlineNavButtonsEndSpacingPx;
        int maxHotseatWidthPx = availableWidthPx - sideSpacePx - (dockHotseatBarEndOffset / 4);
        int maxHotseatIconsWidthPx = maxHotseatWidthPx - (isQsbInline ? hotseatQsbWidth : 0);