fixed btns color
This commit is contained in:
@@ -264,33 +264,6 @@ public class ThemesUtils {
|
||||
return MilkshakeHelper.e();
|
||||
}
|
||||
|
||||
private static int[] p() {
|
||||
int[] iArr = new int[4];
|
||||
iArr[0] = getColor(isDarkTheme() ? R.color.gray_800 : R.color.white);
|
||||
iArr[1] = getColor(isDarkTheme() ? R.color.switch_disabled_on_dark : R.color.switch_disabled_on_light);
|
||||
iArr[2] = getColor(R.color.gray_20);
|
||||
iArr[3] = getAccentColor();
|
||||
return iArr;
|
||||
}
|
||||
|
||||
private static int[][] f() {
|
||||
return new int[][]{new int[]{-16842910, -16842912}, new int[]{-16842910, 16842912}, new int[]{-16842912}, new int[]{16842912}};
|
||||
}
|
||||
|
||||
private static int[] q() {
|
||||
return new int[]{VKThemeHelper.d(R.attr.loader_track_fill), getMutedAccentColor(), VKThemeHelper.d(R.attr.loader_track_fill), getMutedAccentColor()};
|
||||
}
|
||||
|
||||
public static void setSwitch(SwitchCompat switchCompat) {
|
||||
DrawableCompat.setTintList(DrawableCompat.wrap(switchCompat.getThumbDrawable()), new ColorStateList(f(), p()));
|
||||
DrawableCompat.setTintList(DrawableCompat.wrap(switchCompat.getTrackDrawable()), new ColorStateList(f(), q()));
|
||||
}
|
||||
|
||||
public static void setSwitch(Switch aSwitch) {
|
||||
DrawableCompat.setTintList(DrawableCompat.wrap(aSwitch.getThumbDrawable()), new ColorStateList(f(), p()));
|
||||
DrawableCompat.setTintList(DrawableCompat.wrap(aSwitch.getTrackDrawable()), new ColorStateList(f(), q()));
|
||||
}
|
||||
|
||||
public static void setImageViewColored(ImageView view){
|
||||
view.setColorFilter(ThemesUtils.getAccentColor(), PorterDuff.Mode.MULTIPLY);
|
||||
}
|
||||
|
||||
@@ -1188,9 +1188,9 @@
|
||||
aput v1, v0, v3
|
||||
|
||||
.line 84
|
||||
sget v1, Lb/h/z/b;->accent:I
|
||||
invoke-static {}, Lru/vtosters/lite/utils/ThemesUtils;->getAccentColor()I
|
||||
|
||||
invoke-static {v1}, Lcom/vk/core/ui/themes/VKThemeHelper;->d(I)I
|
||||
move-result v1
|
||||
|
||||
invoke-static {v1, v2}, Lcom/vk/core/util/ColorUtils;->b(IF)I
|
||||
|
||||
@@ -1212,9 +1212,9 @@
|
||||
aput v1, v0, v2
|
||||
|
||||
.line 86
|
||||
sget v1, Lb/h/z/b;->accent:I
|
||||
invoke-static {}, Lru/vtosters/lite/utils/ThemesUtils;->getAccentColor()I
|
||||
|
||||
invoke-static {v1}, Lcom/vk/core/ui/themes/VKThemeHelper;->d(I)I
|
||||
move-result v1
|
||||
|
||||
const/4 v2, 0x3
|
||||
|
||||
@@ -2607,9 +2607,9 @@
|
||||
aput v1, v0, v2
|
||||
|
||||
.line 2
|
||||
sget v1, Lb/h/z/b;->accent:I
|
||||
invoke-static {}, Lru/vtosters/lite/utils/ThemesUtils;->getAccentColor()I
|
||||
|
||||
invoke-static {v1}, Lcom/vk/core/ui/themes/VKThemeHelper;->d(I)I
|
||||
move-result v1
|
||||
|
||||
const v2, 0x3df5c28f # 0.12f
|
||||
|
||||
@@ -2633,9 +2633,9 @@
|
||||
aput v1, v0, v2
|
||||
|
||||
.line 4
|
||||
sget v1, Lb/h/z/b;->accent:I
|
||||
invoke-static {}, Lru/vtosters/lite/utils/ThemesUtils;->getAccentColor()I
|
||||
|
||||
invoke-static {v1}, Lcom/vk/core/ui/themes/VKThemeHelper;->d(I)I
|
||||
move-result v1
|
||||
|
||||
const v2, 0x3ef5c28f # 0.48f
|
||||
|
||||
@@ -2783,10 +2783,6 @@
|
||||
.method public final a(Landroid/widget/Switch;)V
|
||||
.locals 4
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/ThemesUtils;->setSwitch(Landroid/widget/Switch;)V
|
||||
|
||||
return-void
|
||||
|
||||
.line 90
|
||||
invoke-virtual {p1}, Landroid/widget/Switch;->getThumbDrawable()Landroid/graphics/drawable/Drawable;
|
||||
|
||||
@@ -2839,10 +2835,6 @@
|
||||
.method public final a(Landroidx/appcompat/widget/SwitchCompat;)V
|
||||
.locals 4
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/ThemesUtils;->setSwitch(Landroidx/appcompat/widget/SwitchCompat;)V
|
||||
|
||||
return-void
|
||||
|
||||
.line 88
|
||||
invoke-virtual {p1}, Landroidx/appcompat/widget/SwitchCompat;->getThumbDrawable()Landroid/graphics/drawable/Drawable;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user