fix(YouTube - Settings): Icon not drawn correctly on some systems (#6683)

This commit is contained in:
Dawid Krajcarz 2026-03-08 20:52:16 +01:00 committed by GitHub
parent 49dffe37c5
commit ddb6396b3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,9 @@
package app.revanced.extension.youtube.patches.theme;
import android.content.res.ColorStateList;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
@ -10,7 +12,6 @@ import androidx.annotation.Nullable;
import app.revanced.extension.shared.ResourceType;
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.
@ -82,4 +83,19 @@ public class ReVancedSettingsIconDynamicDrawable extends Drawable {
super.onBoundsChange(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);
}
}