Increating the scrim alpha for super-light wallpapers

Bug: 79111591
Change-Id: I645d5e536ea504a37f7cc0bb94a677f694bf4385
This commit is contained in:
Sunny Goyal 2018-05-14 13:55:42 -07:00
parent 7c86a1ad42
commit 039b9d2bed
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);