Scale corner radius when swiping down on a task

Now the corner radius matches the window when the task fills the screen.

Change-Id: Ic149f39053ac1e4cfa1304d4dfd3ed0688b92410
This commit is contained in:
Tony
2018-12-27 20:25:01 -08:00
parent b2061daa56
commit c2a137630a
@@ -329,13 +329,14 @@ public class ClipAnimationHelper {
canvas.concat(mTmpMatrix);
canvas.translate(mTargetRect.left, mTargetRect.top);
float scale = mTargetRect.width() / mSourceRect.width();
float insetProgress = (1 - progress);
ttv.drawOnCanvas(canvas,
-mSourceWindowClipInsets.left * insetProgress,
-mSourceWindowClipInsets.top * insetProgress,
ttv.getMeasuredWidth() + mSourceWindowClipInsets.right * insetProgress,
ttv.getMeasuredHeight() + mSourceWindowClipInsets.bottom * insetProgress,
Utilities.mapRange(progress, mWindowCornerRadius, ttv.getCornerRadius()));
Utilities.mapRange(progress, mWindowCornerRadius * scale, ttv.getCornerRadius()));
}
public RectF getTargetRect() {