Refactored vkui injector + added headers coloring
This commit is contained in:
@@ -30,6 +30,10 @@ public class Themes {
|
||||
return VKThemeHelper.a((int) R.attr.tabbar_background);
|
||||
}
|
||||
|
||||
public static int getHeaderBackground() {
|
||||
return VKThemeHelper.a((int) R.attr.header_background);
|
||||
}
|
||||
|
||||
public static int getAmoledTheme() {
|
||||
return Helper.GetContext().getResources().getIdentifier("BaseAmoledStyle", "style", Helper.GetContext().getPackageName());
|
||||
}
|
||||
|
||||
@@ -44,7 +44,10 @@ public class VKUIInjector {
|
||||
|
||||
public static void load() {
|
||||
loadedCSS = load("vt_ui_accent.css")
|
||||
.replace("%accent%", Themes.hex(Themes.getAccentColor()))
|
||||
.replace("%header_background%", Themes.hex(Themes.getColorFromAttr(R.attr.header_background)))
|
||||
.replace("%background_content%", Themes.hex(Themes.getColorFromAttr(R.attr.background_content)))
|
||||
.replace("%header_text%", Themes.hex(Themes.getColorFromAttr(R.attr.header_text)))
|
||||
.replace("%accent%", Themes.hex(Themes.getColorFromAttr(R.attr.accent)))
|
||||
.replace("%background_page%", Themes.hex(Themes.getColorFromAttr(R.attr.background_page)))
|
||||
.replace("%background_content%", Themes.hex(Themes.getColorFromAttr(R.attr.background_content)))
|
||||
.replace("%text_primary%", Themes.hex(Themes.getColorFromAttr(R.attr.text_primary)));
|
||||
|
||||
Reference in New Issue
Block a user