diff options
-rw-r--r-- | src/com/android/launcher3/FolderIcon.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/launcher3/FolderIcon.java b/src/com/android/launcher3/FolderIcon.java index 4a701d558..be6cf4857 100644 --- a/src/com/android/launcher3/FolderIcon.java +++ b/src/com/android/launcher3/FolderIcon.java @@ -73,6 +73,8 @@ public class FolderIcon extends FrameLayout implements FolderListener { // The amount of vertical spread between items in the stack [0...1] private static final float PERSPECTIVE_SHIFT_FACTOR = 0.24f; + private static final float PERSPECTIVE_SHIFT_FACTOR_L = 0.18f; + // Flag as to whether or not to draw an outer ring. Currently none is designed. public static final boolean HAS_OUTER_RING = true; @@ -501,10 +503,16 @@ public class FolderIcon extends FrameLayout implements FolderListener { int adjustedAvailableSpace = (int) ((mAvailableSpaceInPreview / 2) * (1 + 0.8f)); int unscaledHeight = (int) (mIntrinsicIconSize * (1 + PERSPECTIVE_SHIFT_FACTOR)); + if (Utilities.isLmp()) { + unscaledHeight = (int) (mIntrinsicIconSize * (1 + PERSPECTIVE_SHIFT_FACTOR_L)); + } mBaselineIconScale = (1.0f * adjustedAvailableSpace / unscaledHeight); mBaselineIconSize = (int) (mIntrinsicIconSize * mBaselineIconScale); mMaxPerspectiveShift = mBaselineIconSize * PERSPECTIVE_SHIFT_FACTOR; + if (Utilities.isLmp()) { + mMaxPerspectiveShift = mBaselineIconSize * PERSPECTIVE_SHIFT_FACTOR_L; + } mPreviewOffsetX = (mTotalWidth - mAvailableSpaceInPreview) / 2; mPreviewOffsetY = previewPadding + grid.folderBackgroundOffset; @@ -559,6 +567,10 @@ public class FolderIcon extends FrameLayout implements FolderListener { float totalScale = mBaselineIconScale * scale; final int overlayAlpha = (int) (80 * (1 - r)); + if (Utilities.isLmp()) { + transX = (mAvailableSpaceInPreview - scaledSize) / 2; + } + if (params == null) { params = new PreviewItemDrawingParams(transX, transY, totalScale, overlayAlpha); } else { |