From 17899a6d6d3a494135f96202452571f0cbdd80a2 Mon Sep 17 00:00:00 2001 From: Osyx <9387558+Osyx@users.noreply.github.com> Date: Sun, 26 Jun 2022 16:01:31 +0200 Subject: [PATCH] Add new "Lavender" theme (#7343) * Add new "Lavender" theme * Add light theme values for Lavender theme * Fix order of enums * Fix accented UI elements in set categories sheet being different colors Co-authored-by: CrepeTF (cherry picked from commit ad106bd8842dfc9c047c0412b92a0cb1dc1aba1a) --- .../data/preference/PreferenceValues.kt | 5 ++- .../ui/base/delegate/ThemingDelegate.kt | 3 ++ .../materialdialogs/QuadStateTextView.kt | 2 +- .../main/res/values-night/color_lavender.xml | 37 +++++++++++++++++++ app/src/main/res/values/color_lavender.xml | 36 ++++++++++++++++++ app/src/main/res/values/strings.xml | 1 + app/src/main/res/values/themes.xml | 28 ++++++++++++++ 7 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/values-night/color_lavender.xml create mode 100644 app/src/main/res/values/color_lavender.xml diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt index ecff434c92..c5965588e3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt @@ -30,13 +30,14 @@ object PreferenceValues { enum class AppTheme(val titleResId: Int?) { DEFAULT(R.string.label_default), MONET(R.string.theme_monet), + GREEN_APPLE(R.string.theme_greenapple), + LAVENDER(R.string.theme_lavender), MIDNIGHT_DUSK(R.string.theme_midnightdusk), STRAWBERRY_DAIQUIRI(R.string.theme_strawberrydaiquiri), - YOTSUBA(R.string.theme_yotsuba), TAKO(R.string.theme_tako), - GREEN_APPLE(R.string.theme_greenapple), TEALTURQUOISE(R.string.theme_tealturquoise), YINYANG(R.string.theme_yinyang), + YOTSUBA(R.string.theme_yotsuba), // Deprecated DARK_BLUE(null), diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/delegate/ThemingDelegate.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/delegate/ThemingDelegate.kt index c3d74a15ce..f3e54385a7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/delegate/ThemingDelegate.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/delegate/ThemingDelegate.kt @@ -20,6 +20,9 @@ interface ThemingDelegate { PreferenceValues.AppTheme.GREEN_APPLE -> { resIds += R.style.Theme_Tachiyomi_GreenApple } + PreferenceValues.AppTheme.LAVENDER -> { + resIds += R.style.Theme_Tachiyomi_Lavender + } PreferenceValues.AppTheme.MIDNIGHT_DUSK -> { resIds += R.style.Theme_Tachiyomi_MidnightDusk } diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateTextView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateTextView.kt index b6b21fccaf..e8e9fe77f6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateTextView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateTextView.kt @@ -29,7 +29,7 @@ class QuadStateTextView @JvmOverloads constructor(context: Context, attrs: Attri val tint = if (state == State.UNCHECKED) { context.getThemeColor(R.attr.colorControlNormal) } else { - context.getThemeColor(R.attr.colorAccent) + context.getThemeColor(R.attr.colorPrimary) } if (tint != 0) { TextViewCompat.setCompoundDrawableTintList(this, ColorStateList.valueOf(tint)) diff --git a/app/src/main/res/values-night/color_lavender.xml b/app/src/main/res/values-night/color_lavender.xml new file mode 100644 index 0000000000..d76e55486e --- /dev/null +++ b/app/src/main/res/values-night/color_lavender.xml @@ -0,0 +1,37 @@ + + + + #A177FF + #111129 + #A177FF + #111129 + #A177FF + #111129 + #A177FF + #111129 + #5E25E1 + #E8E8E8 + #111129 + #DEE8FF + #111129 + #DEE8FF + #111129 + #DEE8FF + #2CB6B6B6 + #E8E8E8 + #A8905FFF + #DEE8FF + #221247 + #A177FF + @color/lavender_primary + diff --git a/app/src/main/res/values/color_lavender.xml b/app/src/main/res/values/color_lavender.xml new file mode 100644 index 0000000000..f6cfda65c2 --- /dev/null +++ b/app/src/main/res/values/color_lavender.xml @@ -0,0 +1,36 @@ + + + + #7B46AF + #EDE2FF + #7B46AF + #EDE2FF + #7B46AF + #EDE2FF + #7B46AF + #EDE2FF + #EDE2FF + #7B46AF + #EDE2FF + #7B46AF + #EDE2FF + #1B1B22 + #EDE2FF + #1B1B22 + #B9B0CC + #D849454E + #7B46AF + #F3EFF4 + #313033 + #D6BAFF + @color/lavender_primary + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1b75f26576..2632544b80 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -157,6 +157,7 @@ App theme Dynamic Green Apple + Lavender Midnight Dusk Strawberry Daiquiri Tako diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 81a1c64cbe..67867d06f9 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -121,6 +121,34 @@ @color/greenapple_primaryInverse + + +