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);
|
||||
|
||||
Reference in New Issue
Block a user