mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Change taskbar corner roundness when entering overview
- Roundness will be 0 in Launcher, and 1 in an app Bug: 250645563 Test: With and without taskbar in overview, switch between home/overview/app and observe the round corners above taskbar Test: Ensure corner above taskbar is correct in overview and in app when chat bubble is active Change-Id: I1f4911626c8e79fce8d81a76a9bd0d0670d111da
This commit is contained in:
@@ -73,6 +73,7 @@ import java.util.StringJoiner;
|
||||
|
||||
private TaskbarControllers mControllers;
|
||||
private AnimatedFloat mTaskbarBackgroundAlpha;
|
||||
private AnimatedFloat mTaskbarCornerRoundness;
|
||||
private MultiProperty mIconAlphaForHome;
|
||||
private QuickstepLauncher mLauncher;
|
||||
|
||||
@@ -133,6 +134,7 @@ import java.util.StringJoiner;
|
||||
|
||||
mTaskbarBackgroundAlpha = mControllers.taskbarDragLayerController
|
||||
.getTaskbarBackgroundAlpha();
|
||||
mTaskbarCornerRoundness = mControllers.getTaskbarCornerRoundness();
|
||||
mIconAlphaForHome = mControllers.taskbarViewController
|
||||
.getTaskbarIconAlpha().get(ALPHA_INDEX_HOME);
|
||||
|
||||
@@ -316,6 +318,19 @@ import java.util.StringJoiner;
|
||||
.setDuration(duration));
|
||||
}
|
||||
|
||||
float cornerRoundness = goingToLauncher ? 0 : 1;
|
||||
// Don't animate if corner roundness has reached desired value.
|
||||
if (mTaskbarCornerRoundness.isAnimating()
|
||||
|| mTaskbarCornerRoundness.value != cornerRoundness) {
|
||||
mTaskbarCornerRoundness.cancelAnimation();
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "onStateChangeApplied - taskbarCornerRoundness - "
|
||||
+ mTaskbarCornerRoundness.value
|
||||
+ " -> " + cornerRoundness + ": " + duration);
|
||||
}
|
||||
animatorSet.play(mTaskbarCornerRoundness.animateToValue(cornerRoundness));
|
||||
}
|
||||
|
||||
if (mIconAlignment.isAnimatingToValue(toAlignment)
|
||||
|| mIconAlignment.isSettledOnValue(toAlignment)) {
|
||||
// Already at desired value, but make sure we run the callback at the end.
|
||||
@@ -333,6 +348,7 @@ import java.util.StringJoiner;
|
||||
}
|
||||
animatorSet.play(iconAlignAnim);
|
||||
}
|
||||
|
||||
animatorSet.setInterpolator(EMPHASIZED);
|
||||
|
||||
if (start) {
|
||||
|
||||
Reference in New Issue
Block a user