Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-apps-Launcher3: コミット

packages/apps/Launcher3


コミットメタ情報

リビジョン9279496e542e6dee3355e19e4a696e800873ee96 (tree)
日時2017-06-07 05:21:11
作者Hyunyoung Song <hyunyoungs@goog...>
コミッターHyunyoung Song

ログメッセージ

Prevent clipping on the top and left side on AdaptiveIconDrawables
b/62372639

Change-Id: I0b2c0daecba2904f3e89f7b0b558d9b10f5dcbf6

変更サマリ

差分

--- a/src/com/android/launcher3/graphics/LauncherIcons.java
+++ b/src/com/android/launcher3/graphics/LauncherIcons.java
@@ -266,9 +266,10 @@ public class LauncherIcons {
266266
267267 sOldBounds.set(icon.getBounds());
268268 if (Utilities.isAtLeastO() && icon instanceof AdaptiveIconDrawable) {
269- int offset = Math.min(left, top);
269+ int offset = Math.max((int)(ShadowGenerator.BLUR_FACTOR * iconBitmapSize),
270+ Math.min(left, top));
270271 int size = Math.max(width, height);
271- icon.setBounds(offset, offset, offset + size, offset + size);
272+ icon.setBounds(offset, offset, size, size);
272273 } else {
273274 icon.setBounds(left, top, left+width, top+height);
274275 }
--- a/src/com/android/launcher3/graphics/ShadowGenerator.java
+++ b/src/com/android/launcher3/graphics/ShadowGenerator.java
@@ -35,7 +35,7 @@ public class ShadowGenerator {
3535
3636 // Percent of actual icon size
3737 private static final float HALF_DISTANCE = 0.5f;
38- private static final float BLUR_FACTOR = 0.5f/48;
38+ public static final float BLUR_FACTOR = 0.5f/48;
3939
4040 // Percent of actual icon size
4141 private static final float KEY_SHADOW_DISTANCE = 1f/48;
旧リポジトリブラウザで表示