Loading src/com/android/launcher3/DeviceProfile.java +15 −15 Original line number Diff line number Diff line Loading @@ -258,6 +258,8 @@ public class DeviceProfile { public int dropTargetGapPx; public int dropTargetButtonWorkspaceEdgeGapPx; private boolean isNoHintGesture = false; // Insets private final Rect mInsets = new Rect(); public final Rect workspacePadding = new Rect(); Loading Loading @@ -322,6 +324,9 @@ public class DeviceProfile { final Resources res = context.getResources(); mMetrics = res.getDisplayMetrics(); isNoHintGesture = isGestural() && LineageSettings.System.getInt( context.getContentResolver(), LineageSettings.System.NAVIGATION_BAR_HINT, 0) != 1; // Determine sizes. widthPx = windowBounds.bounds.width(); heightPx = windowBounds.bounds.height(); Loading Loading @@ -1441,11 +1446,9 @@ public class DeviceProfile { float hotseatCellWidth = (float) widthPx / numShownHotseatIcons; int hotseatAdjustment = Math.round((workspaceCellWidth - hotseatCellWidth) / 2); int hotseatIconMargin = Math.abs(hotseatCellHeightPx - iconSizePx); boolean noHint = isFullyGesture && LineageSettings.System.getInt( context.getContentResolver(), LineageSettings.System.NAVIGATION_BAR_HINT, 0) != 1; // Values obtained by manual validation, independent of dpi and display scale double marginScaleFactor = isFullyGesture ? (noHint ? 2.5 : 3.25) ? (isNoHintGesture ? 2.5 : 3.25) : 2.75; hotseatBarPadding.set( hotseatAdjustment + workspacePadding.left + cellLayoutPaddingPx.left Loading @@ -1453,9 +1456,8 @@ public class DeviceProfile { 0, hotseatAdjustment + workspacePadding.right + cellLayoutPaddingPx.right + mInsets.right, getHotseatBarBottomPadding() - (int) (marginScaleFactor * hotseatIconMargin) getHotseatBarBottomPadding() - (int) (marginScaleFactor * hotseatIconMargin) ); } return hotseatBarPadding; Loading Loading @@ -1506,11 +1508,11 @@ public class DeviceProfile { } } else { boolean isFullyGesture = isGestural(); boolean noHint = isFullyGesture && LineageSettings.System.getInt( context.getContentResolver(), LineageSettings.System.NAVIGATION_BAR_HINT, 0) != 1; return hotseatBarBottomSpacePx + (int) ((isFullyGesture ? (noHint ? -2.5f : 1f) : 2f) * heightDifference); if (isNoHintGesture) { return Math.abs(hotseatBarSizePx - iconSizePx) / 2; } return hotseatBarBottomSpacePx + (int) ((isGestural() ? .75f : 2f) * heightDifference); } } Loading Loading @@ -1636,9 +1638,7 @@ public class DeviceProfile { private int getDeductibleGestureHeight() { if (isVerticalBarLayout() || context == null) return 0; boolean noHint = isGestural() && LineageSettings.System.getInt( context.getContentResolver(), LineageSettings.System.NAVIGATION_BAR_HINT, 0) != 1; if (!noHint) return 0; if (!isNoHintGesture) return 0; return ResourceUtils.getDimenByName(NAVBAR_BOTTOM_GESTURE_SIZE, context.getResources(), 0); } Loading Loading
src/com/android/launcher3/DeviceProfile.java +15 −15 Original line number Diff line number Diff line Loading @@ -258,6 +258,8 @@ public class DeviceProfile { public int dropTargetGapPx; public int dropTargetButtonWorkspaceEdgeGapPx; private boolean isNoHintGesture = false; // Insets private final Rect mInsets = new Rect(); public final Rect workspacePadding = new Rect(); Loading Loading @@ -322,6 +324,9 @@ public class DeviceProfile { final Resources res = context.getResources(); mMetrics = res.getDisplayMetrics(); isNoHintGesture = isGestural() && LineageSettings.System.getInt( context.getContentResolver(), LineageSettings.System.NAVIGATION_BAR_HINT, 0) != 1; // Determine sizes. widthPx = windowBounds.bounds.width(); heightPx = windowBounds.bounds.height(); Loading Loading @@ -1441,11 +1446,9 @@ public class DeviceProfile { float hotseatCellWidth = (float) widthPx / numShownHotseatIcons; int hotseatAdjustment = Math.round((workspaceCellWidth - hotseatCellWidth) / 2); int hotseatIconMargin = Math.abs(hotseatCellHeightPx - iconSizePx); boolean noHint = isFullyGesture && LineageSettings.System.getInt( context.getContentResolver(), LineageSettings.System.NAVIGATION_BAR_HINT, 0) != 1; // Values obtained by manual validation, independent of dpi and display scale double marginScaleFactor = isFullyGesture ? (noHint ? 2.5 : 3.25) ? (isNoHintGesture ? 2.5 : 3.25) : 2.75; hotseatBarPadding.set( hotseatAdjustment + workspacePadding.left + cellLayoutPaddingPx.left Loading @@ -1453,9 +1456,8 @@ public class DeviceProfile { 0, hotseatAdjustment + workspacePadding.right + cellLayoutPaddingPx.right + mInsets.right, getHotseatBarBottomPadding() - (int) (marginScaleFactor * hotseatIconMargin) getHotseatBarBottomPadding() - (int) (marginScaleFactor * hotseatIconMargin) ); } return hotseatBarPadding; Loading Loading @@ -1506,11 +1508,11 @@ public class DeviceProfile { } } else { boolean isFullyGesture = isGestural(); boolean noHint = isFullyGesture && LineageSettings.System.getInt( context.getContentResolver(), LineageSettings.System.NAVIGATION_BAR_HINT, 0) != 1; return hotseatBarBottomSpacePx + (int) ((isFullyGesture ? (noHint ? -2.5f : 1f) : 2f) * heightDifference); if (isNoHintGesture) { return Math.abs(hotseatBarSizePx - iconSizePx) / 2; } return hotseatBarBottomSpacePx + (int) ((isGestural() ? .75f : 2f) * heightDifference); } } Loading Loading @@ -1636,9 +1638,7 @@ public class DeviceProfile { private int getDeductibleGestureHeight() { if (isVerticalBarLayout() || context == null) return 0; boolean noHint = isGestural() && LineageSettings.System.getInt( context.getContentResolver(), LineageSettings.System.NAVIGATION_BAR_HINT, 0) != 1; if (!noHint) return 0; if (!isNoHintGesture) return 0; return ResourceUtils.getDimenByName(NAVBAR_BOTTOM_GESTURE_SIZE, context.getResources(), 0); } Loading