diff --git a/app/src/main/java/ru/vtosters/lite/utils/VKUIInjector.java b/app/src/main/java/ru/vtosters/lite/utils/VKUIInjector.java
index fde4f34df..43b16ccba 100644
--- a/app/src/main/java/ru/vtosters/lite/utils/VKUIInjector.java
+++ b/app/src/main/java/ru/vtosters/lite/utils/VKUIInjector.java
@@ -1,5 +1,7 @@
package ru.vtosters.lite.utils;
+import static ru.vtosters.lite.utils.Themes.amoled;
+
import android.util.Base64;
import android.util.Log;
import android.webkit.WebView;
@@ -50,7 +52,7 @@ public class VKUIInjector {
.replace("%background_content%", Themes.hex(Themes.getColorFromAttr(R.attr.background_content)))
.replace("%text_primary%", Themes.hex(Themes.getColorFromAttr(R.attr.text_primary)));
- // loadedCSSAmoled = load("vt_ui_oled.css");
+ loadedCSSAmoled = load("vt_ui_oled.css");
isLoaded = true;
}
@@ -65,11 +67,13 @@ public class VKUIInjector {
}
StringBuilder sb = new StringBuilder();
if (true/*Themes.isAccentedCache()*/) {
- Log.d("VKUI", "Injecting Accent");
sb.append("\n\n");
sb.append(loadedCSS);
}
- Log.d("VKUI", "Final CSS: " + sb.toString());
+ if (amoled() == true) {
+ sb.append("\n\n");
+ sb.append(loadedCSSAmoled);
+ }
inject(webView, Base64.encodeToString(sb.toString().getBytes(), 2));
}
}
diff --git a/smali/assets/vt_ui_oled.css b/smali/assets/vt_ui_oled.css
new file mode 100644
index 000000000..ff193d553
--- /dev/null
+++ b/smali/assets/vt_ui_oled.css
@@ -0,0 +1,92 @@
+/* vkui.css V2 by iTaysonLab */
+/* Articles */
+body.article_body.article_dark {
+ background-color: #000000 !important;
+}
+
+.article_dark .articleView__content {
+ border-top: #000000 !important;
+ background-color: #000000 !important;
+}
+
+.article_dark .article {
+ background-color: #000000 !important;
+ color: #FFFFFF !important;
+}
+
+.articleView__content_misc_block .articleView__content_views_info {
+ color: #FFFFFF !important;
+}
+
+.article_dark .article>h1 {
+ color: %textColorPrimary% !important;
+}
+
+.article__info_line {
+ color: #FFFFFF !important;
+}
+
+.Audio__duration, .r .ai_dur {
+ color: #FFFFFF !important;
+}
+
+.Audio__texts, .r .ai_label {
+ color: #FFFFFF !important;
+}
+
+.article_dark .ai_title {
+ color: #FFFFFF !important;
+}
+
+.article>figure figcaption:not(.article_ed__figcaption) {
+ color: #FFFFFF !important;
+}
+
+/* VK Support fixes */
+[scheme="client_dark"] .CatalogSearch__input, [scheme="space_gray"] .CatalogSearch__input {
+ background: #000000 !important;
+}
+
+/* Generic VKUI */
+body[scheme=space_gray] {
+ /* light background */
+ --attach_picker_tab_active_icon: #000000 !important;
+ --background_content: #000000 !important;
+ --button_bot_shadow: #000000 !important;
+ --button_primary_foreground: #000000 !important;
+ --content_tint_background: #000000 !important;
+ --counter_secondary_text: #000000 !important;
+ --loader_background: #000000 !important;
+ --overlay_status_background: #000000 !important;
+ --header_background: #19191a !important;
+ --header_alternate_background: #19191a !important;
+ --separator_alternate: #000000 !important;
+ --segmented_control_bar_background: #000000 !important;
+ --search_bar_background: #000000 !important;
+ /* background */
+ --background_page: #000000 !important;
+ --header_background_before_blur: #19191a !important;
+ --header_background_before_blur_alternate: #19191a !important;
+ /* lighter BG (text fields) */
+ --attach_picker_tab_inactive_background: #121212 !important;
+ --background_keyboard: #121212 !important;
+ --background_suggestions: #121212 !important;
+ --field_background: #121212 !important;
+ --im_bubble_incoming: #121212 !important;
+ --input_border: #121212 !important;
+ --modal_card_background: #121212 !important;
+ --separator_common: #121212 !important;
+ --snippet_background: #121212 !important;
+ --android_active_color: #121212 !important;
+ --switch_ios_off_border: #121212 !important;
+ /* third BG (buttons) */
+ --button_secondary_background: #212121 !important;
+ --header_search_field_background: #212121 !important;
+ --icon_tertiary: #212121 !important;
+ --im_bubble_outgoing: #212121 !important;
+ --input_background: #212121 !important;
+ --loader_track_fill: #212121 !important;
+ --search_bar_field_background: #212121 !important;
+ --selection_off_icon: #212121 !important;
+ --panel_tab_active_background: #212121 !important;
+}
\ No newline at end of file
diff --git a/smali/res/xml/preferences_debug.xml b/smali/res/xml/preferences_debug.xml
index d59b9d6e4..4b0b4c971 100644
--- a/smali/res/xml/preferences_debug.xml
+++ b/smali/res/xml/preferences_debug.xml
@@ -4,7 +4,6 @@
-
diff --git a/smali/res/xml/preferences_themes.xml b/smali/res/xml/preferences_themes.xml
index cba190674..0856652ee 100644
--- a/smali/res/xml/preferences_themes.xml
+++ b/smali/res/xml/preferences_themes.xml
@@ -1,6 +1,7 @@
+