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

Commit 78da8815 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Minor cleanup for ThemeOptionPreviewer" into ub-launcher3-master

parents 370d63f9 7beb4375
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -128,8 +128,8 @@ class ThemeOptionPreviewer implements LifecycleObserver {
            public void onLayoutChange(View view, int left, int top, int right, int bottom,
                                       int oldLeft, int oldTop, int oldRight, int oldBottom) {
                // Calculate the full preview card height and width.
                int fullPreviewCardHeight = getFullPreviewCardHeight();
                int fullPreviewCardWidth = (int) (getFullPreviewCardHeight() / screenAspectRatio);
                final int fullPreviewCardHeight = getFullPreviewCardHeight();
                final int fullPreviewCardWidth = (int) (fullPreviewCardHeight / screenAspectRatio);

                // Relayout the content view to match full preview card size.
                mContentView.measure(
@@ -139,8 +139,7 @@ class ThemeOptionPreviewer implements LifecycleObserver {

                // Scale the content view from full preview size to the container size. For full
                // preview, the scale value is 1.
                float scale =
                        (float) previewContainer.getMeasuredHeight() / getFullPreviewCardHeight();
                float scale = (float) previewContainer.getMeasuredHeight() / fullPreviewCardHeight;
                mContentView.setScaleX(scale);
                mContentView.setScaleY(scale);
                // The pivot point is centered by default, set to (0, 0).