Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2a13763 authored by Tony's avatar Tony
Browse files

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
parent b2061daa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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() {