summaryrefslogtreecommitdiff
path: root/quickstep
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2022-02-14 13:03:46 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-02-14 13:03:46 +0000
commitbf96683e46a2c5c09ed6b84115f71881dd4c67ff (patch)
treec1a01078d847e662f907a6025e919958cad9805b /quickstep
parentbf63e9cf2bc089d230c3fbd5d911d0ea9a548137 (diff)
parent9b2b607a0942cabf712d4406f01c4086ac88490e (diff)
downloadLauncher3-bf96683e46a2c5c09ed6b84115f71881dd4c67ff.tar.gz
Merge "Fix taskbar hotseat alignment"
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
index 62f1fa5412..8b6831b8d6 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
@@ -215,7 +215,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
PendingAnimation setter = new PendingAnimation(100);
Rect hotseatPadding = launcherDp.getHotseatLayoutPadding(mActivity);
float scaleUp = ((float) launcherDp.iconSizePx) / mActivity.getDeviceProfile().iconSizePx;
- int borderSpacing = launcherDp.cellLayoutBorderSpacePx.x;
+ int borderSpacing = launcherDp.hotseatBorderSpace;
int hotseatCellSize = DeviceProfile.calculateCellWidth(
launcherDp.availableWidthPx - hotseatPadding.left - hotseatPadding.right,
borderSpacing,
@@ -253,9 +253,9 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
float hotseatIconCenter = hotseatPadding.left
+ (hotseatCellSize + borderSpacing) * positionInHotseat
- + hotseatCellSize / 2;
+ + hotseatCellSize / 2f;
- float childCenter = (child.getLeft() + child.getRight()) / 2;
+ float childCenter = (child.getLeft() + child.getRight()) / 2f;
setter.setFloat(child, ICON_TRANSLATE_X, hotseatIconCenter - childCenter, LINEAR);
setter.setFloat(child, SCALE_PROPERTY, scaleUp, LINEAR);