mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Merge "Scale task's rounded corners in grid to match focused task." into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
87f764cea1
@@ -296,9 +296,8 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
}
|
||||
|
||||
float fullScreenProgress = Utilities.boundToRange(this.fullScreenProgress.value, 0, 1);
|
||||
mCurrentFullscreenParams.setProgress(
|
||||
fullScreenProgress, recentsViewScale.value, /*taskViewScale=*/1f, mTaskRect.width(),
|
||||
mDp, mPositionHelper);
|
||||
mCurrentFullscreenParams.setProgress(fullScreenProgress, recentsViewScale.value,
|
||||
/* taskViewScale= */1f, mTaskRect.width(), mDp, mPositionHelper);
|
||||
|
||||
// Apply thumbnail matrix
|
||||
RectF insets = mCurrentFullscreenParams.mCurrentDrawnInsets;
|
||||
|
||||
@@ -1071,7 +1071,6 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
|
||||
private void setNonGridScale(float nonGridScale) {
|
||||
mNonGridScale = nonGridScale;
|
||||
updateCornerRadius();
|
||||
applyScale();
|
||||
}
|
||||
|
||||
@@ -1102,6 +1101,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
scale *= mDismissScale;
|
||||
setScaleX(scale);
|
||||
setScaleY(scale);
|
||||
updateSnapshotRadius();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1417,29 +1417,25 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
mIconView.setVisibility(progress < 1 ? VISIBLE : INVISIBLE);
|
||||
mSnapshotView.getTaskOverlay().setFullscreenProgress(progress);
|
||||
|
||||
updateCornerRadius();
|
||||
updateSnapshotRadius();
|
||||
|
||||
mSnapshotView.setFullscreenParams(mCurrentFullscreenParams);
|
||||
mOutlineProvider.updateParams(
|
||||
mCurrentFullscreenParams,
|
||||
mActivity.getDeviceProfile().overviewTaskThumbnailTopMarginPx);
|
||||
invalidateOutline();
|
||||
}
|
||||
|
||||
private void updateCornerRadius() {
|
||||
private void updateSnapshotRadius() {
|
||||
updateCurrentFullscreenParams(mSnapshotView.getPreviewPositionHelper());
|
||||
mSnapshotView.setFullscreenParams(mCurrentFullscreenParams);
|
||||
}
|
||||
|
||||
void updateCurrentFullscreenParams(PreviewPositionHelper previewPositionHelper) {
|
||||
if (getRecentsView() == null) {
|
||||
return;
|
||||
}
|
||||
mCurrentFullscreenParams.setProgress(
|
||||
mFullscreenProgress,
|
||||
getRecentsView().getScaleX(),
|
||||
mNonGridScale,
|
||||
getWidth(), mActivity.getDeviceProfile(),
|
||||
previewPositionHelper);
|
||||
mCurrentFullscreenParams.setProgress(mFullscreenProgress, getRecentsView().getScaleX(),
|
||||
getScaleX(), getWidth(), mActivity.getDeviceProfile(), previewPositionHelper);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user