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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user