Added "Strawberry Daiquiri" theme (#5176)

This commit is contained in:
Soitora 2021-05-24 22:02:45 +02:00 committed by GitHub
parent eaf9c9b2d8
commit 0fb9ca3e8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 2 deletions

View File

@ -18,6 +18,7 @@ object PreferenceValues {
enum class LightThemeVariant {
default,
blue,
strawberrydaiquiri,
}
// Keys are lowercase to match legacy string values

View File

@ -33,6 +33,7 @@ abstract class BaseThemedActivity : AppCompatActivity() {
when (preferences.themeLight().get()) {
LightThemeVariant.default -> R.style.Theme_Tachiyomi_Light
LightThemeVariant.blue -> R.style.Theme_Tachiyomi_Light_Blue
LightThemeVariant.strawberrydaiquiri -> R.style.Theme_Tachiyomi_Light_StrawberryDaiquiri
}
}
setTheme(themeId)

View File

@ -116,11 +116,13 @@ class SettingsGeneralController : SettingsController() {
titleRes = R.string.pref_theme_light
entriesRes = arrayOf(
R.string.theme_light_default,
R.string.theme_light_blue
R.string.theme_light_blue,
R.string.theme_light_strawberrydaiquiri
)
entryValues = arrayOf(
Values.LightThemeVariant.default.name,
Values.LightThemeVariant.blue.name
Values.LightThemeVariant.blue.name,
Values.LightThemeVariant.strawberrydaiquiri.name
)
defaultValue = Values.LightThemeVariant.default.name
summary = "%s"

View File

@ -28,6 +28,11 @@
<color name="dialogLight">@color/md_white_1000</color>
<color name="selectorColorLight">@color/md_blue_A400_38</color>
<!-- Strawberry Daiquiri Theme -->
<color name="colorAccentStrawberry">#ED4A65</color>
<color name="rippleSecondaryColorStrawberry">#0AED4A65</color>
<color name="selectorColorStrawberry">#6FED4A65</color>
<!-- Dark Theme -->
<color name="colorAccentDark">#3399FF</color>
<color name="textColorPrimaryDark">@color/md_white_1000</color>

View File

@ -156,6 +156,7 @@
<string name="pref_theme_light">Light theme</string>
<string name="theme_light_default">Default</string>
<string name="theme_light_blue">Light blue</string>
<string name="theme_light_strawberrydaiquiri">Strawberry daiquiri</string>
<string name="pref_theme_dark">Dark theme</string>
<string name="theme_dark_default">Default</string>
<string name="theme_dark_blue">Dark blue</string>

View File

@ -132,6 +132,20 @@
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
</style>
<!--== Strawberry Daiquiri theme ==-->
<style name="Theme.Tachiyomi.Light.StrawberryDaiquiri">
<!-- Theme colors -->
<item name="colorAccentOnPrimary">@color/colorAccentStrawberry</item>
<item name="colorSecondary">@color/colorAccentStrawberry</item>
<item name="colorAccent">@color/colorAccentStrawberry</item>
<!-- Ripples -->
<item name="rippleSecondaryColor">@color/rippleSecondaryColorStrawberry</item>
<!-- Custom Attributes-->
<item name="colorLibrarySelectionActive">@color/selectorColorStrawberry</item>
</style>
<!--=============-->
<!-- Dark Themes -->
<!--=============-->