From 606c908b90dc00073fc4fadcee458c536469572c Mon Sep 17 00:00:00 2001 From: gdlbo <41114720+gdlbo@users.noreply.github.com> Date: Tue, 7 Feb 2023 00:09:52 +0300 Subject: [PATCH] some color fixes --- app/src/main/java/ru/vtosters/lite/themes/ThemesCore.java | 8 ++++++-- .../com/vk/newsfeed/holders/HeaderHolder.smali | 4 ++++ .../com/vk/newsfeed/holders/RepostHolder.smali | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/ru/vtosters/lite/themes/ThemesCore.java b/app/src/main/java/ru/vtosters/lite/themes/ThemesCore.java index f5c5df809..9fd0f3dba 100644 --- a/app/src/main/java/ru/vtosters/lite/themes/ThemesCore.java +++ b/app/src/main/java/ru/vtosters/lite/themes/ThemesCore.java @@ -25,6 +25,7 @@ public class ThemesCore { private static boolean cachedAccents = false; private static int outgoinging_msg; private static int outgoinging_msg_highlight; + private static int darken_color; static { setExceptions(); @@ -85,7 +86,6 @@ public class ThemesCore { cachedAccents = true; themedColors.clear(); - themedColors.put(R.attr.text_link, accentColor); themedColors.put(R.attr.accent, accentColor); themedColors.put(R.attr.newsfeed_dropdown_color, accentColor); themedColors.put(R.attr.icon_name, accentColor); @@ -125,7 +125,10 @@ public class ThemesCore { themedColors.put(R.attr.im_attach_tint, accentColor); themedColors.put(R.attr.im_forward_line_tint, accentColor); themedColors.put(R.attr.link_alternate, accentColor); - themedColors.put(R.attr.newsfeed_post_title_color, accentColor); + + darken_color = ThemesUtils.darken(accentColor, 0.15f); + themedColors.put(R.attr.newsfeed_post_title_color, darken_color); + themedColors.put(R.attr.text_link, darken_color); themedColors.put(R.attr.attach_picker_tab_active_background, accentColor); themedColors.put(R.attr.attach_picker_tab_active_text, accentColor); @@ -154,6 +157,7 @@ public class ThemesCore { return switch (attr) { case R.attr.im_bubble_wallpaper_outgoing, R.attr.im_bubble_outgoing -> outgoinging_msg; case R.attr.im_bubble_outgoing_highlighted -> outgoinging_msg_highlight; + case R.attr.newsfeed_post_title_color, R.attr.text_link -> darken_color; default -> themedColors.get(attr); }; } diff --git a/smali/smali_classes3/com/vk/newsfeed/holders/HeaderHolder.smali b/smali/smali_classes3/com/vk/newsfeed/holders/HeaderHolder.smali index 4a4b11a37..f526e72ab 100644 --- a/smali/smali_classes3/com/vk/newsfeed/holders/HeaderHolder.smali +++ b/smali/smali_classes3/com/vk/newsfeed/holders/HeaderHolder.smali @@ -2538,6 +2538,8 @@ .line 26 :goto_4 + const v1, 0x7f040403 + invoke-static {v0, v1}, Lcom/vk/extensions/TextViewExt;->a(Landroid/widget/TextView;I)V .line 27 @@ -3695,6 +3697,8 @@ const v0, 0x7f040598 :goto_0 + const v0, 0x7f040403 + return v0 .end method diff --git a/smali/smali_classes3/com/vk/newsfeed/holders/RepostHolder.smali b/smali/smali_classes3/com/vk/newsfeed/holders/RepostHolder.smali index f0ac81644..534fba19b 100644 --- a/smali/smali_classes3/com/vk/newsfeed/holders/RepostHolder.smali +++ b/smali/smali_classes3/com/vk/newsfeed/holders/RepostHolder.smali @@ -540,6 +540,8 @@ .line 10 :goto_2 + const v0, 0x7f040403 + iget-object v1, p0, Lcom/vk/newsfeed/holders/RepostHolder;->H:Landroid/widget/TextView; invoke-static {v1, v0}, Lcom/vk/extensions/TextViewExt;->a(Landroid/widget/TextView;I)V