mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Adjust height of tablet AllApps base on row height
- Also used hotseatQsbHeight for AllApps QSB height as they have to match to transform between each other Fix: 232907846 Test: manual on different tablets Test: atest DeviceProfileTest Change-Id: I001d0e129db2a5de6c8ace4c3302381110da03f1
This commit is contained in:
@@ -295,10 +295,11 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
boolean isRtl = Utilities.isRtl(child.getResources());
|
||||
float hotseatIconCenter = isRtl
|
||||
? launcherDp.widthPx - hotseatPadding.right + borderSpacing
|
||||
+ launcherDp.qsbWidth / 2f
|
||||
: hotseatPadding.left - borderSpacing - launcherDp.qsbWidth / 2f;
|
||||
+ launcherDp.hotseatQsbWidth / 2f
|
||||
: hotseatPadding.left - borderSpacing - launcherDp.hotseatQsbWidth / 2f;
|
||||
float childCenter = (child.getLeft() + child.getRight()) / 2f;
|
||||
float halfQsbIconWidthDiff = (launcherDp.qsbWidth - taskbarDp.iconSizePx) / 2f;
|
||||
float halfQsbIconWidthDiff =
|
||||
(launcherDp.hotseatQsbWidth - taskbarDp.iconSizePx) / 2f;
|
||||
setter.addFloat(child, ICON_TRANSLATE_X,
|
||||
isRtl ? -halfQsbIconWidthDiff : halfQsbIconWidthDiff,
|
||||
hotseatIconCenter - childCenter, LINEAR);
|
||||
@@ -312,7 +313,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
: Interpolators.clampToProgress(LINEAR, 0.84f, 1f));
|
||||
setter.addOnFrameListener(animator -> AlphaUpdateListener.updateVisibility(child));
|
||||
|
||||
float qsbInsetFraction = halfQsbIconWidthDiff / launcherDp.qsbWidth;
|
||||
float qsbInsetFraction = halfQsbIconWidthDiff / launcherDp.hotseatQsbWidth;
|
||||
if (child instanceof HorizontalInsettableView) {
|
||||
setter.addFloat((HorizontalInsettableView) child,
|
||||
HorizontalInsettableView.HORIZONTAL_INSETS, qsbInsetFraction, 0,
|
||||
|
||||
Reference in New Issue
Block a user