mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 01:35:10 +01:00
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 <trungnguyen02@outlookcom>
This commit is contained in:
parent
37fe25ac06
commit
ad106bd884
@ -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),
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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))
|
||||
|
37
app/src/main/res/values-night/color_lavender.xml
Normal file
37
app/src/main/res/values-night/color_lavender.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Colors for Lavender theme
|
||||
~
|
||||
~ Color scheme by Osyx
|
||||
~
|
||||
~ Key colors:
|
||||
~ Primary #A177FF
|
||||
~ Secondary #A177FF
|
||||
~ Tertiary #5E25E1
|
||||
~ Neutral #111129
|
||||
-->
|
||||
<resources>
|
||||
<color name="lavender_primary">#A177FF</color>
|
||||
<color name="lavender_onPrimary">#111129</color>
|
||||
<color name="lavender_primaryContainer">#A177FF</color>
|
||||
<color name="lavender_onPrimaryContainer">#111129</color>
|
||||
<color name="lavender_secondary">#A177FF</color>
|
||||
<color name="lavender_onSecondary">#111129</color>
|
||||
<color name="lavender_secondaryContainer">#A177FF</color>
|
||||
<color name="lavender_onSecondaryContainer">#111129</color>
|
||||
<color name="lavender_tertiary">#5E25E1</color>
|
||||
<color name="lavender_onTertiary">#E8E8E8</color>
|
||||
<color name="lavender_tertiaryContainer">#111129</color>
|
||||
<color name="lavender_onTertiaryContainer">#DEE8FF</color>
|
||||
<color name="lavender_background">#111129</color>
|
||||
<color name="lavender_onBackground">#DEE8FF</color>
|
||||
<color name="lavender_surface">#111129</color>
|
||||
<color name="lavender_onSurface">#DEE8FF</color>
|
||||
<color name="lavender_surfaceVariant">#2CB6B6B6</color>
|
||||
<color name="lavender_onSurfaceVariant">#E8E8E8</color>
|
||||
<color name="lavender_outline">#A8905FFF</color>
|
||||
<color name="lavender_inverseOnSurface">#DEE8FF</color>
|
||||
<color name="lavender_inverseSurface">#221247</color>
|
||||
<color name="lavender_primaryInverse">#A177FF</color>
|
||||
<color name="lavender_elevationOverlay">@color/lavender_primary</color>
|
||||
</resources>
|
36
app/src/main/res/values/color_lavender.xml
Normal file
36
app/src/main/res/values/color_lavender.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Colors for Lavender theme
|
||||
~ Original color scheme by CrepeTF
|
||||
~
|
||||
~ Key colors:
|
||||
~ Primary #7B46AF
|
||||
~ Secondary #7B46AF
|
||||
~ Tertiary #EDE2FF
|
||||
~ Neutral #EDE2FF
|
||||
-->
|
||||
<resources>
|
||||
<color name="lavender_primary">#7B46AF</color>
|
||||
<color name="lavender_onPrimary">#EDE2FF</color>
|
||||
<color name="lavender_primaryContainer">#7B46AF</color>
|
||||
<color name="lavender_onPrimaryContainer">#EDE2FF</color>
|
||||
<color name="lavender_secondary">#7B46AF</color>
|
||||
<color name="lavender_onSecondary">#EDE2FF</color>
|
||||
<color name="lavender_secondaryContainer">#7B46AF</color>
|
||||
<color name="lavender_onSecondaryContainer">#EDE2FF</color>
|
||||
<color name="lavender_tertiary">#EDE2FF</color>
|
||||
<color name="lavender_onTertiary">#7B46AF</color>
|
||||
<color name="lavender_tertiaryContainer">#EDE2FF</color>
|
||||
<color name="lavender_onTertiaryContainer">#7B46AF</color>
|
||||
<color name="lavender_background">#EDE2FF</color>
|
||||
<color name="lavender_onBackground">#1B1B22</color>
|
||||
<color name="lavender_surface">#EDE2FF</color>
|
||||
<color name="lavender_onSurface">#1B1B22</color>
|
||||
<color name="lavender_surfaceVariant">#B9B0CC</color>
|
||||
<color name="lavender_onSurfaceVariant">#D849454E</color>
|
||||
<color name="lavender_outline">#7B46AF</color>
|
||||
<color name="lavender_inverseOnSurface">#F3EFF4</color>
|
||||
<color name="lavender_inverseSurface">#313033</color>
|
||||
<color name="lavender_primaryInverse">#D6BAFF</color>
|
||||
<color name="lavender_elevationOverlay">@color/lavender_primary</color>
|
||||
</resources>
|
@ -159,6 +159,7 @@
|
||||
<string name="pref_app_theme">App theme</string>
|
||||
<string name="theme_monet">Dynamic</string>
|
||||
<string name="theme_greenapple">Green Apple</string>
|
||||
<string name="theme_lavender">Lavender</string>
|
||||
<string name="theme_midnightdusk">Midnight Dusk</string>
|
||||
<string name="theme_strawberrydaiquiri">Strawberry Daiquiri</string>
|
||||
<string name="theme_tako">Tako</string>
|
||||
|
@ -121,6 +121,34 @@
|
||||
<item name="colorPrimaryInverse">@color/greenapple_primaryInverse</item>
|
||||
</style>
|
||||
|
||||
<!--== Lavender Theme ==-->
|
||||
<style name="Theme.Tachiyomi.Lavender">
|
||||
<!-- Theme Colors -->
|
||||
<item name="colorPrimary">@color/lavender_primary</item>
|
||||
<item name="colorOnPrimary">@color/lavender_onPrimary</item>
|
||||
<item name="colorPrimaryContainer">@color/lavender_primaryContainer</item>
|
||||
<item name="colorOnPrimaryContainer">@color/lavender_onPrimaryContainer</item>
|
||||
<item name="colorSecondary">@color/lavender_secondary</item>
|
||||
<item name="colorOnSecondary">@color/lavender_onSecondary</item>
|
||||
<item name="colorSecondaryContainer">@color/lavender_secondaryContainer</item>
|
||||
<item name="colorOnSecondaryContainer">@color/lavender_onSecondaryContainer</item>
|
||||
<item name="colorTertiary">@color/lavender_tertiary</item>
|
||||
<item name="colorOnTertiary">@color/lavender_onTertiary</item>
|
||||
<item name="colorTertiaryContainer">@color/lavender_tertiaryContainer</item>
|
||||
<item name="colorOnTertiaryContainer">@color/lavender_onTertiaryContainer</item>
|
||||
<item name="android:colorBackground">@color/lavender_background</item>
|
||||
<item name="colorOnBackground">@color/lavender_onBackground</item>
|
||||
<item name="colorSurface">@color/lavender_surface</item>
|
||||
<item name="colorOnSurface">@color/lavender_onSurface</item>
|
||||
<item name="colorSurfaceVariant">@color/lavender_surfaceVariant</item>
|
||||
<item name="colorOnSurfaceVariant">@color/lavender_onSurfaceVariant</item>
|
||||
<item name="colorOutline">@color/lavender_outline</item>
|
||||
<item name="colorOnSurfaceInverse">@color/lavender_inverseOnSurface</item>
|
||||
<item name="colorSurfaceInverse">@color/lavender_inverseSurface</item>
|
||||
<item name="colorPrimaryInverse">@color/lavender_primaryInverse</item>
|
||||
<item name="elevationOverlayColor">@color/lavender_elevationOverlay</item>
|
||||
</style>
|
||||
|
||||
<!--== Midnight Dusk Theme ==-->
|
||||
<style name="Theme.Tachiyomi.MidnightDusk">
|
||||
<!-- Theme Colors -->
|
||||
|
Loading…
Reference in New Issue
Block a user