From 176e984b56d66d1e47bd367d7dde03e4a024152c Mon Sep 17 00:00:00 2001 From: Soitora Date: Mon, 24 May 2021 17:16:32 +0200 Subject: [PATCH] Add "Midnight Dusk" and "Hot Pink" themes (#5161) * Organize and clarify themes file Increases clarification with better commenting, should make it easier to add or modify current themes. * Make AMOLED its own theme category * Tweak ripples for AMOLED * Add "Midnight Dusk" theme Ports it from jobobby04/TachiyomiSY. Co-Authored-By: CrepeTF <70870719+CrepeTF@users.noreply.github.com> * Add "Hot Pink" theme Ports it from jobobby04/TachiyomiSY. Co-Authored-By: OncePunchedMan <64155117+OncePunchedMan@users.noreply.github.com> * Make AMOLED a base theme * Final tweaks Rename "Toolbar.Light" to "Custom.PopupTheme" Changes placing of backgroundDusk Removes HotPink and MidnightDusk custom Toolbars, I believe they are unnecessary. * Rename a Midnight Dusk color * Make AMOLED independent from Dark as a theme Co-authored-by: CrepeTF <70870719+CrepeTF@users.noreply.github.com> Co-authored-by: OncePunchedMan <64155117+OncePunchedMan@users.noreply.github.com> --- .../data/preference/PreferenceValues.kt | 2 + .../ui/base/activity/BaseThemedActivity.kt | 4 +- .../ui/setting/SettingsGeneralController.kt | 8 +- app/src/main/res/values/colors.xml | 38 +++ app/src/main/res/values/strings.xml | 2 + app/src/main/res/values/styles.xml | 18 +- app/src/main/res/values/themes.xml | 226 +++++++++++++++--- 7 files changed, 256 insertions(+), 42 deletions(-) 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 13cda32696..bdd11acc57 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 @@ -24,7 +24,9 @@ object PreferenceValues { enum class DarkThemeVariant { default, blue, + midnightdusk, amoled, + hotpink, } /* ktlint-enable experimental:enum-entry-name-case */ diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/BaseThemedActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/BaseThemedActivity.kt index 11ddee568e..90283f20b0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/BaseThemedActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/BaseThemedActivity.kt @@ -25,7 +25,9 @@ abstract class BaseThemedActivity : AppCompatActivity() { when (preferences.themeDark().get()) { DarkThemeVariant.default -> R.style.Theme_Tachiyomi_Dark DarkThemeVariant.blue -> R.style.Theme_Tachiyomi_Dark_Blue - DarkThemeVariant.amoled -> R.style.Theme_Tachiyomi_Dark_Amoled + DarkThemeVariant.midnightdusk -> R.style.Theme_Tachiyomi_Dark_MidnightDusk + DarkThemeVariant.amoled -> R.style.Theme_Tachiyomi_Amoled + DarkThemeVariant.hotpink -> R.style.Theme_Tachiyomi_Amoled_HotPink } } else { when (preferences.themeLight().get()) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt index 5c53a1e350..4c871d0726 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt @@ -141,12 +141,16 @@ class SettingsGeneralController : SettingsController() { entriesRes = arrayOf( R.string.theme_dark_default, R.string.theme_dark_blue, - R.string.theme_dark_amoled + R.string.theme_dark_midnightdusk, + R.string.theme_dark_amoled, + R.string.theme_dark_amoled_hotpink ) entryValues = arrayOf( Values.DarkThemeVariant.default.name, Values.DarkThemeVariant.blue.name, - Values.DarkThemeVariant.amoled.name + Values.DarkThemeVariant.midnightdusk.name, + Values.DarkThemeVariant.amoled.name, + Values.DarkThemeVariant.hotpink.name ) defaultValue = Values.DarkThemeVariant.default.name summary = "%s" diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 4c43322e96..90b4a280f5 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -8,8 +8,11 @@ #242529 #202125 + + @color/md_black_1000 + @color/colorPrimary @@ -38,6 +41,38 @@ @color/colorDarkPrimary @color/md_blue_A200_50 + + #F02475 + @color/md_white_1000 + @color/md_white_1000_70 + @color/md_white_1000_50 + #12ffffff + #0FF02475 + #16151D + #201F27 + #80F02475 + + + #3399FF + @color/md_white_1000 + @color/md_white_1000_70 + @color/md_white_1000_50 + @android:color/transparent + @color/md_white_1000_8 + #0A3399FF + @color/rippleColorAmoled + @color/colorAmoledPrimary + @color/colorAmoledPrimary + @color/md_blue_A200_50 + + + #FF3399 + @color/md_white_1000 + @color/md_white_1000_70 + @color/md_white_1000_50 + #0AFF3399 + #80FF69B4 + @color/colorDarkPrimary @color/md_grey_50_75 @@ -45,12 +80,14 @@ #FFC107 #FFEB3B + #FFEB3B #DE000000 #8A000000 #61000000 #1F000000 + #14000000 #0F000000 #FFFFFFFF @@ -59,6 +96,7 @@ #80FFFFFF #33FFFFFF #1FFFFFFF + #14FFFFFF #0FFFFFFF diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 45c1b1cbed..af36ed7512 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -159,7 +159,9 @@ Dark theme Default Dark blue + Midnight dusk AMOLED black + Hot pink Start screen Language Default diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 2f7d92a3e9..f09c428915 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -6,11 +6,7 @@ - - @@ -18,6 +14,14 @@ ?attr/rippleToolbarColor + + + + @@ -68,6 +72,10 @@ @color/colorAccentDark + + diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 859335eefe..890bff4cf9 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -4,16 +4,16 @@ - - - - + + + + + + + @@ -118,6 +135,8 @@ + + + - - - - - + + + + + + + + + + + + -