amoled vkui issues fix

This commit is contained in:
gdlbo
2023-05-28 18:02:09 +03:00
parent 73420fe1c4
commit 2c501606be
2 changed files with 15 additions and 18 deletions
@@ -12,30 +12,27 @@ public class WebViewColoringUtils {
public static String loadedCSS = "";
public static String loadedCSSAmoled = "";
private static String load(String str) {
private static String readCSS(String str) {
try (var is = getGlobalContext().getAssets().open(str)) {
return IOUtils.readAllLines(is);
return IOUtils.readAllLines(is)
.replace("%header_background%", hex(getHeaderBackground()))
.replace("%background_content%", hex(getBackgroundContent()))
.replace("%header_text%", hex(getHeaderText()))
.replace("%accent%", hex(getAccentColor()))
.replace("%background_page%", hex(getBackgroundPage()))
.replace("%content_tint_background%", hex(getColorFromAttr(com.vtosters.lite.R.attr.content_tint_background)))
.replace("%button_primary_background%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_primary_background)))
.replace("%button_outline_foreground%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_outline_foreground)))
.replace("%button_outline_border%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_outline_border)))
.replace("%text_primary%", hex(getTextAttr()));
} catch (IOException e) {
e.printStackTrace();
return "";
}
}
public static void load() {
loadedCSS = load("vt_ui_accent.css")
.replace("%header_background%", hex(getHeaderBackground()))
.replace("%background_content%", hex(getBackgroundContent()))
.replace("%header_text%", hex(getHeaderText()))
.replace("%accent%", hex(getAccentColor()))
.replace("%background_page%", hex(getBackgroundPage()))
.replace("%content_tint_background%", hex(getColorFromAttr(com.vtosters.lite.R.attr.content_tint_background)))
.replace("%button_primary_background%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_primary_background)))
.replace("%button_outline_foreground%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_outline_foreground)))
.replace("%button_outline_border%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_outline_border)))
.replace("%text_primary%", hex(getTextAttr()));
loadedCSSAmoled = load("vt_ui_oled.css");
loadedCSS = readCSS("vt_ui_accent.css");
loadedCSSAmoled = readCSS("vt_ui_oled.css");
isLoaded = true;
}
+1 -1
View File
@@ -20,7 +20,7 @@ body.article_body.article_dark {
}
.article_dark .article>h1 {
color: %textColorPrimary% !important;
color: %text_primary% !important;
}
.article__info_line {