Merge "Consider TaskView's scale when calculating corner radius" into sc-v2-dev am: 010e3dfb26
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14899458 Change-Id: Id9e479b0f1b4edd0a825b6240c4359447fc2d11e
This commit is contained in:
@@ -256,8 +256,8 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
|
||||
float fullScreenProgress = Utilities.boundToRange(this.fullScreenProgress.value, 0, 1);
|
||||
mCurrentFullscreenParams.setProgress(
|
||||
fullScreenProgress, recentsViewScale.value, mTaskRect.width(), mDp,
|
||||
mPositionHelper);
|
||||
fullScreenProgress, recentsViewScale.value, /*taskViewScale=*/1f, mTaskRect.width(),
|
||||
mDp, mPositionHelper);
|
||||
|
||||
// Apply thumbnail matrix
|
||||
RectF insets = mCurrentFullscreenParams.mCurrentDrawnInsets;
|
||||
|
||||
@@ -1353,6 +1353,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
mCurrentFullscreenParams.setProgress(
|
||||
mFullscreenProgress,
|
||||
getRecentsView().getScaleX(),
|
||||
getScaleX(),
|
||||
getWidth(), mActivity.getDeviceProfile(),
|
||||
previewPositionHelper);
|
||||
}
|
||||
@@ -1494,8 +1495,8 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
/**
|
||||
* Sets the progress in range [0, 1]
|
||||
*/
|
||||
public void setProgress(float fullscreenProgress, float parentScale, int previewWidth,
|
||||
DeviceProfile dp, PreviewPositionHelper pph) {
|
||||
public void setProgress(float fullscreenProgress, float parentScale, float taskViewScale,
|
||||
int previewWidth, DeviceProfile dp, PreviewPositionHelper pph) {
|
||||
RectF insets = pph.getInsetsToDrawInFullscreen();
|
||||
|
||||
float currentInsetsLeft = insets.left * fullscreenProgress;
|
||||
@@ -1506,7 +1507,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
|
||||
mCurrentDrawnCornerRadius =
|
||||
Utilities.mapRange(fullscreenProgress, mCornerRadius, fullscreenCornerRadius)
|
||||
/ parentScale;
|
||||
/ parentScale / taskViewScale;
|
||||
|
||||
// We scaled the thumbnail to fit the content (excluding insets) within task view width.
|
||||
// Now that we are drawing left/right insets again, we need to scale down to fit them.
|
||||
|
||||
Reference in New Issue
Block a user