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);
|
return VKThemeHelper.a((int) R.attr.tabbar_background);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int getHeaderBackground() {
|
||||||
|
return VKThemeHelper.a((int) R.attr.header_background);
|
||||||
|
}
|
||||||
|
|
||||||
public static int getAmoledTheme() {
|
public static int getAmoledTheme() {
|
||||||
return Helper.GetContext().getResources().getIdentifier("BaseAmoledStyle", "style", Helper.GetContext().getPackageName());
|
return Helper.GetContext().getResources().getIdentifier("BaseAmoledStyle", "style", Helper.GetContext().getPackageName());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,10 @@ public class VKUIInjector {
|
|||||||
|
|
||||||
public static void load() {
|
public static void load() {
|
||||||
loadedCSS = load("vt_ui_accent.css")
|
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_page%", Themes.hex(Themes.getColorFromAttr(R.attr.background_page)))
|
||||||
.replace("%background_content%", Themes.hex(Themes.getColorFromAttr(R.attr.background_content)))
|
.replace("%background_content%", Themes.hex(Themes.getColorFromAttr(R.attr.background_content)))
|
||||||
.replace("%text_primary%", Themes.hex(Themes.getColorFromAttr(R.attr.text_primary)));
|
.replace("%text_primary%", Themes.hex(Themes.getColorFromAttr(R.attr.text_primary)));
|
||||||
|
|||||||
@@ -19,10 +19,6 @@ body[scheme=bright_light] {
|
|||||||
--cell_button_foreground: %accent% !important;
|
--cell_button_foreground: %accent% !important;
|
||||||
--control_foreground: %accent% !important;
|
--control_foreground: %accent% !important;
|
||||||
--counter_primary_background: %accent% !important;
|
--counter_primary_background: %accent% !important;
|
||||||
--header_alternate_tab_active_indicator: %accent% !important;
|
|
||||||
--header_tab_active_indicator: %accent% !important;
|
|
||||||
--header_tint: %accent% !important;
|
|
||||||
--header_tint_alternate: %accent% !important;
|
|
||||||
--im_attach_tint: %accent% !important;
|
--im_attach_tint: %accent% !important;
|
||||||
--im_reply_sender_text: %accent% !important;
|
--im_reply_sender_text: %accent% !important;
|
||||||
--im_reply_separator: %accent% !important;
|
--im_reply_separator: %accent% !important;
|
||||||
@@ -42,24 +38,70 @@ body[scheme=bright_light] {
|
|||||||
--writebar_icon: %accent% !important;
|
--writebar_icon: %accent% !important;
|
||||||
--dynamic_blue: %accent% !important;
|
--dynamic_blue: %accent% !important;
|
||||||
/* backgrounds */
|
/* backgrounds */
|
||||||
--background_content: %background_page% !important;
|
--background_content: %background_content% !important;
|
||||||
--background_page: %background_page% !important;
|
--background_page: %background_page% !important;
|
||||||
--content_tint_background: %background_page% !important;
|
--content_tint_background: %background_page% !important;
|
||||||
--loader_background: %background_page% !important;
|
--loader_background: %background_page% !important;
|
||||||
--header_background: %background_page% !important;
|
--header_background: %header_background% !important;
|
||||||
--header_background_before_blur: %background_page% !important;
|
--header_background_before_blur: %header_background% !important;
|
||||||
--header_background_before_blur_alternate: %background_page% !important;
|
--header_background_before_blur_alternate: %header_background% !important;
|
||||||
--header_alternate_background: %background_page% !important;
|
--header_alternate_background: %header_background% !important;
|
||||||
|
|
||||||
|
--header_text_alternate: %header_text% !important;
|
||||||
|
--header_text: %header_text% !important;
|
||||||
|
--header_text_secondary: %header_text% !important;
|
||||||
|
--header_tint: %header_text% !important;
|
||||||
|
--header_tint_alternate: %header_text% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body[scheme=space_gray] {
|
body[scheme=space_gray] {
|
||||||
--accent: %accent% !important;
|
--accent: %accent% !important;
|
||||||
|
--action_sheet_action_foreground: %accent% !important;
|
||||||
|
--attach_picker_tab_active_background: %accent% !important;
|
||||||
|
--attach_picker_tab_active_text: %accent% !important;
|
||||||
|
--button_muted_foreground: %accent% !important;
|
||||||
|
--button_outline_border: %accent% !important;
|
||||||
|
--button_outline_foreground: %accent% !important;
|
||||||
|
--button_primary_background: %accent% !important;
|
||||||
|
--button_secondary_foreground: %accent% !important;
|
||||||
|
--button_tertiary_foreground: %accent% !important;
|
||||||
|
--cell_button_foreground: %accent% !important;
|
||||||
|
--control_foreground: %accent% !important;
|
||||||
|
--counter_primary_background: %accent% !important;
|
||||||
|
--im_attach_tint: %accent% !important;
|
||||||
|
--im_reply_sender_text: %accent% !important;
|
||||||
|
--im_reply_separator: %accent% !important;
|
||||||
|
--im_text_name: %accent% !important;
|
||||||
|
--landing_login_button_background: %accent% !important;
|
||||||
|
--landing_primary_button_background: %accent% !important;
|
||||||
|
--landing_tertiary_button_foreground: %accent% !important;
|
||||||
|
--landing_text_title: %accent% !important;
|
||||||
|
--landing_secondary_button_foreground: %accent% !important;
|
||||||
|
--link_alternate: %accent% !important;
|
||||||
|
--loader_track_value_fill: %accent% !important;
|
||||||
|
--feed_recommended_friend_promo_background: %accent% !important;
|
||||||
|
--tabbar_active_icon: %accent% !important;
|
||||||
--tabbar_tablet_active_icon: %accent% !important;
|
--tabbar_tablet_active_icon: %accent% !important;
|
||||||
--text_link: %accent% !important;
|
--text_link: %accent% !important;
|
||||||
--text_link_hightlighted_background: %accent% !important;
|
--text_name: %accent% !important;
|
||||||
|
--writebar_icon: %accent% !important;
|
||||||
--dynamic_blue: %accent% !important;
|
--dynamic_blue: %accent% !important;
|
||||||
|
--background_content: %background_content% !important;
|
||||||
|
--background_page: %background_page% !important;
|
||||||
|
--content_tint_background: %background_page% !important;
|
||||||
|
--loader_background: %background_page% !important;
|
||||||
|
--header_background: %header_background% !important;
|
||||||
|
--header_background_before_blur: %header_background% !important;
|
||||||
|
--header_background_before_blur_alternate: %header_background% !important;
|
||||||
|
--header_alternate_background: %header_background% !important;
|
||||||
|
--header_tint: %header_text% !important;
|
||||||
|
--header_tint_alternate: %header_text% !important;
|
||||||
|
|
||||||
|
--header_text_alternate: %header_text% !important;
|
||||||
|
--header_text: %header_text% !important;
|
||||||
|
--header_text_secondary: %header_text% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* фиксы статей */
|
/* фиксы статей */
|
||||||
|
|||||||
Reference in New Issue
Block a user