@@ -63,6 +63,7 @@ import com.android.launcher3.dot.DotInfo;
|
||||
import com.android.launcher3.dragndrop.DragOptions.PreDragCondition;
|
||||
import com.android.launcher3.dragndrop.DraggableView;
|
||||
import com.android.launcher3.folder.FolderIcon;
|
||||
import com.android.launcher3.graphics.IconPalette;
|
||||
import com.android.launcher3.graphics.IconShape;
|
||||
import com.android.launcher3.graphics.PreloadIconDrawable;
|
||||
import com.android.launcher3.icons.DotRenderer;
|
||||
@@ -398,7 +399,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
boolean useTheme = shouldUseTheme();
|
||||
FastBitmapDrawable iconDrawable = info.newIcon(getContext(), useTheme);
|
||||
mDotParams.appColor = iconDrawable.getIconColor();
|
||||
mDotParams.color = ColorTokens.DotColor.resolveColor(getContext());
|
||||
mDotParams.color = IconPalette.getMutedColor(iconDrawable.getIconColor(), 0.54f);
|
||||
setIcon(iconDrawable);
|
||||
applyLabel(info);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.launcher3.graphics;
|
||||
|
||||
import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
@@ -155,4 +157,9 @@ public class IconPalette {
|
||||
}
|
||||
return ColorUtils.LABToColor(low, a, b);
|
||||
}
|
||||
|
||||
public static int getMutedColor(int color, float whiteScrimAlpha) {
|
||||
int whiteScrim = setColorAlphaBound(Color.WHITE, (int) (255 * whiteScrimAlpha));
|
||||
return ColorUtils.compositeColors(whiteScrim, color);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user