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

Commit 8bd8b861 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

feat: Adjust no hint gesture hotseat height

parent 21309329
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -1990,9 +1990,13 @@ public class DeviceProfile {
     */
    public Rect getHotseatLayoutPadding(Context context) {
        // Make sure to update all relevant sizes for cutout and orientation
        updateHotseatSizes(pxFromDp(inv.iconSize[mTypeIndex], mMetrics));
        int hotseatIconSizePx = pxFromDp(inv.iconSize[mTypeIndex], mMetrics);
        boolean isTaskbarPresent = this.isTaskbarPresent &&
                SettingsCache.INSTANCE.get(context).getValue(ENABLE_TASKBAR, 1);
        if (!isTaskbarPresent && isNoHintGesture) {
            hotseatIconSizePx = (int) (hotseatIconSizePx / 1.2f);
        }
        updateHotseatSizes(hotseatIconSizePx);
        Rect hotseatBarPadding = new Rect();
        boolean isFullyGesture = isGestural();
        if (isVerticalBarLayout()) {
@@ -2083,9 +2087,7 @@ public class DeviceProfile {
            int hotseatAdjustment = Math.round((workspaceCellWidth - hotseatCellWidth) / 2);
            int hotseatIconMargin = Math.abs(hotseatCellHeightPx - iconSizePx);
            // Values obtained by manual validation, independent of dpi and display scale
            double marginScaleFactor = isFullyGesture
                    ? (isNoHintGesture ? 2.5 : 3.25)
                    : 2.75;
            double marginScaleFactor = isFullyGesture ? 3.25 : 2.75;
            hotseatBarPadding.set(
                    hotseatAdjustment + workspacePadding.left + cellLayoutPaddingPx.left
                            + mInsets.left,
@@ -2178,7 +2180,7 @@ public class DeviceProfile {
            }
        } else {
            if (isNoHintGesture) {
                return Math.abs(hotseatBarSizePx - iconSizePx) / 2;
                return (int) (Math.abs(hotseatBarSizePx - iconSizePx) / 2.2f);
            }
            return hotseatBarBottomSpacePx + (int) ((isGestural() ? .75f : 2f)
                    * heightDifference);