mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Revert "Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ...""
This reverts commit 087a9e39b6.
Change-Id: I05b17a6e4aaaef6de3c2fa26aad45a39eb2833f9
This commit is contained in:
@@ -33,6 +33,8 @@ import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.Property;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.graphics.PlaceHolderIconDrawable;
|
||||
import com.android.launcher3.icons.BitmapInfo;
|
||||
import com.android.launcher3.model.data.ItemInfoWithIcon;
|
||||
@@ -54,6 +56,8 @@ public class FastBitmapDrawable extends Drawable {
|
||||
protected Bitmap mBitmap;
|
||||
protected final int mIconColor;
|
||||
|
||||
@Nullable private ColorFilter mColorFilter;
|
||||
|
||||
private boolean mIsPressed;
|
||||
private boolean mIsDisabled;
|
||||
private float mDisabledAlpha = 1f;
|
||||
@@ -115,7 +119,8 @@ public class FastBitmapDrawable extends Drawable {
|
||||
|
||||
@Override
|
||||
public void setColorFilter(ColorFilter cf) {
|
||||
// No op
|
||||
mColorFilter = cf;
|
||||
updateFilter();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -265,7 +270,7 @@ public class FastBitmapDrawable extends Drawable {
|
||||
* Updates the paint to reflect the current brightness and saturation.
|
||||
*/
|
||||
protected void updateFilter() {
|
||||
mPaint.setColorFilter(mIsDisabled ? getDisabledColorFilter() : null);
|
||||
mPaint.setColorFilter(mIsDisabled ? getDisabledColorFilter() : mColorFilter);
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user