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

Commit 176196c0 authored by Hyunyoung Song's avatar Hyunyoung Song Committed by Android (Google) Code Review
Browse files

Merge "Prevent from widget cell preview image from being cut off." into ub-launcher3-burnaby

parents fd69e0b5 b9f932e0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -386,7 +386,7 @@ public class WidgetPreviewLoader {
            preScaledWidthOut[0] = previewWidth;
        }
        if (previewWidth > maxPreviewWidth) {
            scale = maxPreviewWidth / (float) previewWidth;
            scale = (maxPreviewWidth - 2 * mProfileBadgeMargin) / (float) (previewWidth);
        }
        if (scale != 1f) {
            previewWidth = (int) (scale * previewWidth);
@@ -405,7 +405,7 @@ public class WidgetPreviewLoader {
        }

        // Draw the scaled preview into the final bitmap
        int x = (preview.getWidth() - previewWidth - mProfileBadgeMargin) / 2;
        int x = (preview.getWidth() - previewWidth) / 2;
        if (widgetPreviewExists) {
            drawable.setBounds(x, 0, x + previewWidth, previewHeight);
            drawable.draw(c);