Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-apps-Launcher3: Commit

packages/apps/Launcher3


Commit MetaInfo

Revisión88082394eb0f93768843a9884493cfd859563329 (tree)
Tiempo2017-06-07 06:13:16
AutorTreeHugger Robot <treehugger-gerrit@goog...>
CommiterAndroid (Google) Code Review

Log Message

Merge "Prevent clipping on the top and left side on AdaptiveIconDrawables b/62372639" into ub-launcher3-dorval

Cambiar Resumen

Diferencia

--- 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;
Show on old repository browser