monet separator fixes
This commit is contained in:
@@ -3,6 +3,7 @@ package ru.vtosters.lite.utils;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@@ -318,6 +319,14 @@ public class ThemesUtils {
|
||||
return ColorUtils.HSLToColor(hsl);
|
||||
}
|
||||
|
||||
public static int fixSeparator(float f) {
|
||||
if (f == 8.0f && isMonetTheme()) {
|
||||
return 0;
|
||||
} else {
|
||||
return (int) Math.floor(f * Resources.getSystem().getDisplayMetrics().density);
|
||||
}
|
||||
}
|
||||
|
||||
public static int lighten(int color, float factor) {
|
||||
int red = (int) ((Color.red(color) * (1 - factor) / 255 + factor) * 255);
|
||||
int green = (int) ((Color.green(color) * (1 - factor) / 255 + factor) * 255);
|
||||
|
||||
@@ -134,6 +134,12 @@
|
||||
.method public static a(F)I
|
||||
.locals 2
|
||||
|
||||
invoke-static {p0}, Lru/vtosters/lite/utils/ThemesUtils;->fixSeparator(F)I
|
||||
|
||||
move-result p0
|
||||
|
||||
return p0
|
||||
|
||||
.line 2
|
||||
invoke-static {}, Lcom/vk/core/util/Screen;->a()F
|
||||
|
||||
|
||||
Reference in New Issue
Block a user