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

Commit e7a49dc9 authored by Tony Wickham's avatar Tony Wickham
Browse files

Don't add task overlay when thumbnail is rotated

Change-Id: Ie4088c8c1a1c22a30caddc5bfb6b76e6a42ef088
parent 932d3b02
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -139,6 +139,7 @@ public class TaskThumbnailView extends View {
    }

    private void updateThumbnailMatrix() {
        boolean rotate = false;
        if (mBitmapShader != null && mThumbnailData != null) {
            float scale = mThumbnailData.scale;
            float thumbnailWidth = mThumbnailData.thumbnail.getWidth() -
@@ -146,8 +147,6 @@ public class TaskThumbnailView extends View {
            float thumbnailHeight = mThumbnailData.thumbnail.getHeight() -
                    (mThumbnailData.insets.top + mThumbnailData.insets.bottom) * scale;
            final float thumbnailScale;

            boolean rotate = false;
            final DeviceProfile profile = BaseActivity.fromContext(getContext())
                    .getDeviceProfile();
            if (getMeasuredWidth() == 0) {
@@ -226,7 +225,12 @@ public class TaskThumbnailView extends View {
            mPaint.setShader(shader);
        }

        if (rotate) {
            // The overlay doesn't really work when the screenshot is rotated, so don't add it.
            mOverlay.reset();
        } else {
            mOverlay.setTaskInfo(mTask, mThumbnailData, mMatrix);
        }
        invalidate();
    }