Merge "Increating the scrim alpha for super-light wallpapers" into ub-launcher3-edmonton

This commit is contained in:
TreeHugger Robot 2018-05-14 21:30:40 +00:00 committed by Android (Google) Code Review
commit 047437e738
1 changed files with 8 additions and 2 deletions

View File

@ -47,6 +47,7 @@ public class ShelfScrimView extends ScrimView {
private static final int THRESHOLD_ALPHA_DARK = 102;
private static final int THRESHOLD_ALPHA_LIGHT = 46;
private static final int THRESHOLD_ALPHA_SUPER_LIGHT = 128;
// In transposed layout, we simply draw a flat color.
private boolean mDrawingFlatColor;
@ -76,8 +77,13 @@ public class ShelfScrimView extends ScrimView {
mMaxScrimAlpha = OVERVIEW.getWorkspaceScrimAlpha(mLauncher);
mEndAlpha = Color.alpha(mEndScrim);
mThresholdAlpha = Themes.getAttrBoolean(mLauncher, R.attr.isMainColorDark)
? THRESHOLD_ALPHA_DARK : THRESHOLD_ALPHA_LIGHT;
if (Themes.getAttrBoolean(mLauncher, R.attr.isMainColorDark)) {
mThresholdAlpha = THRESHOLD_ALPHA_DARK;
} else if (Themes.getAttrBoolean(mLauncher, R.attr.isWorkspaceDarkText)) {
mThresholdAlpha = THRESHOLD_ALPHA_SUPER_LIGHT;
} else {
mThresholdAlpha = THRESHOLD_ALPHA_LIGHT;
}
mRadius = mLauncher.getResources().getDimension(R.dimen.shelf_surface_radius);
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);