fix(YouTube - Settings): Icon not drawn correctly on some systems (#6683)
This commit is contained in:
parent
49dffe37c5
commit
ddb6396b3f
1 changed files with 17 additions and 1 deletions
|
|
@ -1,7 +1,9 @@
|
||||||
package app.revanced.extension.youtube.patches.theme;
|
package app.revanced.extension.youtube.patches.theme;
|
||||||
|
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.ColorFilter;
|
import android.graphics.ColorFilter;
|
||||||
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
|
||||||
|
|
@ -10,7 +12,6 @@ import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import app.revanced.extension.shared.ResourceType;
|
import app.revanced.extension.shared.ResourceType;
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
import app.revanced.extension.shared.settings.BaseSettings;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamic drawable that is either the regular or bolded ReVanced preference icon.
|
* Dynamic drawable that is either the regular or bolded ReVanced preference icon.
|
||||||
|
|
@ -82,4 +83,19 @@ public class ReVancedSettingsIconDynamicDrawable extends Drawable {
|
||||||
super.onBoundsChange(bounds);
|
super.onBoundsChange(bounds);
|
||||||
icon.setBounds(bounds);
|
icon.setBounds(bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTint(int tintColor) {
|
||||||
|
icon.setTint(tintColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTintList(@Nullable ColorStateList tint) {
|
||||||
|
icon.setTintList(tint);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTintMode(@Nullable PorterDuff.Mode tintMode) {
|
||||||
|
icon.setTintMode(tintMode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue