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

Commit 174cfeee authored by Kshitij's avatar Kshitij
Browse files

fix: Reduce navigation bar height from launcher_dock_width

parent a3fe5abc
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.ICON_OVER
import static com.android.launcher3.icons.GraphicsUtils.getShapePath;
import static com.android.launcher3.testing.shared.ResourceUtils.INVALID_RESOURCE_HANDLE;
import static com.android.launcher3.testing.shared.ResourceUtils.NAVBAR_BOTTOM_GESTURE_SIZE;
import static com.android.launcher3.testing.shared.ResourceUtils.NAVBAR_HEIGHT;
import static com.android.launcher3.testing.shared.ResourceUtils.pxFromDp;
import static com.android.launcher3.testing.shared.ResourceUtils.roundPxValueFromFloat;

@@ -1603,6 +1604,15 @@ public class DeviceProfile {
        return ResourceUtils.getDimenByName(NAVBAR_BOTTOM_GESTURE_SIZE, context.getResources(), 0);
    }

    public int getExtraStatusBarPadding() {
        boolean isFullyGesture = mInfo.navigationMode == NavigationMode.NO_BUTTON;
        if (!isFullyGesture) {
            return ResourceUtils.getDimenByName(NAVBAR_HEIGHT, context.getResources(), 0);
        }
        // Fully gesture is always at the bottom
        return 0;
    }

    private String pxToDpStr(String name, float value) {
        return "\t" + name + ": " + value + "px (" + dpiFromPx(value, mMetrics.densityDpi) + "dp)";
    }
+4 −1
Original line number Diff line number Diff line
@@ -211,7 +211,10 @@ public class Hotseat extends CellLayout implements Insettable, OffsetParent {
        // Setting name is hardcoded here to prevent recompilation of
        // framework jar for studio build
        Settings.Secure.putInt(getContext().getContentResolver(),
                "launcher_dock_width", mActivity.getDeviceProfile().isVerticalBarLayout() ? getWidth() : 0);
                "launcher_dock_width",
                dp.isVerticalBarLayout()
                        ? getWidth() - dp.getExtraStatusBarPadding()
                        : 0);
    }

    /**