Added hot pink and lime (#724)

* add hot pink theme

* add lime theme

* removed unused method
This commit is contained in:
Carlos 2021-04-12 13:06:43 -04:00 committed by GitHub
parent e93627c9ec
commit d5023b1c86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 63 additions and 9 deletions

View File

@ -81,6 +81,16 @@ object ThemeUtil {
AppCompatDelegate.MODE_NIGHT_YES, AppCompatDelegate.MODE_NIGHT_YES,
R.string.black_and_red R.string.black_and_red
), ),
HOT_PINK(
R.style.Theme_Tachiyomi_HotPink,
AppCompatDelegate.MODE_NIGHT_YES,
R.string.hot_pink
),
LIME(
R.style.Theme_Tachiyomi_FlatLime,
AppCompatDelegate.MODE_NIGHT_YES,
R.string.flat_lime
),
LIGHT_BLUE( LIGHT_BLUE(
R.style.Theme_Tachiyomi_AllBlue, R.style.Theme_Tachiyomi_AllBlue,
AppCompatDelegate.MODE_NIGHT_NO, AppCompatDelegate.MODE_NIGHT_NO,
@ -160,8 +170,9 @@ object ThemeUtil {
@ColorInt @ColorInt
val darkBackground: Int = Color.parseColor( val darkBackground: Int = Color.parseColor(
when (styleRes) { when (styleRes) {
R.style.Theme_Tachiyomi_Amoled, R.style.Theme_Tachiyomi_BlackAndRed -> "#000000" R.style.Theme_Tachiyomi_Amoled, R.style.Theme_Tachiyomi_BlackAndRed, R.style.Theme_Tachiyomi_HotPink -> "#000000"
R.style.Theme_Tachiyomi_MidnightDusk -> "#16151D" R.style.Theme_Tachiyomi_MidnightDusk -> "#16151D"
R.style.Theme_Tachiyomi_FlatLime -> "#16151D"
else -> "#1C1C1D" else -> "#1C1C1D"
} }
) )
@ -179,6 +190,8 @@ object ThemeUtil {
when (styleRes) { when (styleRes) {
R.style.Theme_Tachiyomi_MidnightDusk -> "#F02475" R.style.Theme_Tachiyomi_MidnightDusk -> "#F02475"
R.style.Theme_Tachiyomi_BlackAndRed -> "#AA2200" R.style.Theme_Tachiyomi_BlackAndRed -> "#AA2200"
R.style.Theme_Tachiyomi_HotPink -> "#FF3399"
R.style.Theme_Tachiyomi_FlatLime -> "#4AF88A"
else -> "#3399FF" else -> "#3399FF"
} }
) )
@ -221,7 +234,7 @@ object ThemeUtil {
val darkBottomBar: Int = Color.parseColor( val darkBottomBar: Int = Color.parseColor(
when (styleRes) { when (styleRes) {
R.style.Theme_Tachiyomi_AllBlue -> "#54759E" R.style.Theme_Tachiyomi_AllBlue -> "#54759E"
R.style.Theme_Tachiyomi_Amoled, R.style.Theme_Tachiyomi_BlackAndRed -> "#000000" R.style.Theme_Tachiyomi_Amoled, R.style.Theme_Tachiyomi_BlackAndRed, R.style.Theme_Tachiyomi_HotPink -> "#000000"
R.style.Theme_Tachiyomi_MidnightDusk -> "#201F27" R.style.Theme_Tachiyomi_MidnightDusk -> "#201F27"
else -> "#212121" else -> "#212121"
} }

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/white" android:state_enabled="true"/> <item android:color="?attr/colorOnAccent" android:state_enabled="true"/>
<item android:alpha="0.38" android:color="?attr/colorOnSurface"/> <item android:alpha="0.38" android:color="?attr/colorOnSurface"/>
</selector> </selector>

View File

@ -61,7 +61,7 @@
android:paddingStart="5dp" android:paddingStart="5dp"
android:paddingEnd="5dp" android:paddingEnd="5dp"
android:textSize="13sp" android:textSize="13sp"
android:textColor="@color/unread_badge_text" android:textColor="?attr/colorOnAccent"
style="@style/TextAppearance.Regular.Caption.Light" style="@style/TextAppearance.Regular.Caption.Light"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:tint="@color/md_white_1000" android:tint="@color/md_white_1000"

View File

@ -31,4 +31,19 @@
<color name="dialogDuskDawn">#201F27</color> <color name="dialogDuskDawn">#201F27</color>
<color name="textPrimaryDuskDawn">@color/md_white_1000</color> <color name="textPrimaryDuskDawn">@color/md_white_1000</color>
<color name="appBarTextDuskDawn">@color/md_white_1000</color> <color name="appBarTextDuskDawn">@color/md_white_1000</color>
<!-- Hot Pink Theme -->
<color name="colorAccentPink">#FF3399</color>
<!-- Flat Lime Theme -->
<color name="colorAccentLime">#4AF88A</color>
<color name="textColorPrimaryLime">@color/md_white_1000</color>
<color name="textColorSecondaryLime">@color/md_white_1000_76</color>
<color name="textColorHintLime">@color/md_white_1000_50</color>
<color name="rippleColorLime">@color/md_white_1000_20</color>
<color name="backgroundLime">#202125</color>
<color name="colorAccentLimeText">#2C2D32</color>
<color name="dialogLime">#282A2E</color>
<color name="colorOnLime">#2C2D32</color>
</resources> </resources>

View File

@ -27,4 +27,11 @@
<item name="colorAccentText">@color/md_red_500</item> <item name="colorAccentText">@color/md_red_500</item>
</style> </style>
<style name="Theme.Tachiyomi.HotPink" parent="Theme.Tachiyomi.Amoled">
<item name="colorAccent">@color/colorAccentPink</item>
<item name="colorAccentText">@color/colorAccentPink</item>
</style>
</resources> </resources>

View File

@ -14,6 +14,7 @@
<attr name="actionBarTintColor" format="color"/> <attr name="actionBarTintColor" format="color"/>
<attr name="readerBackground" format="color"/> <attr name="readerBackground" format="color"/>
<attr name="colorAccentText" format="color"/> <attr name="colorAccentText" format="color"/>
<attr name="colorOnAccent" format="color"/>
<attr name="tabBarIconColor" format="reference|integer"/> <attr name="tabBarIconColor" format="reference|integer"/>
<attr name="tabBarIconInactive" format="reference|integer"/> <attr name="tabBarIconInactive" format="reference|integer"/>
<attr name="tabHighlightBackground" format="color"/> <attr name="tabHighlightBackground" format="color"/>

View File

@ -553,6 +553,8 @@
<string name="midnight_dusk">Midnight Dusk</string> <string name="midnight_dusk">Midnight Dusk</string>
<string name="spring_blossom">Spring Blossom</string> <string name="spring_blossom">Spring Blossom</string>
<string name="black_and_red">Black \'n\' Red</string> <string name="black_and_red">Black \'n\' Red</string>
<string name="hot_pink">Hot Pink</string>
<string name="flat_lime">Flat Lime</string>
<string name="white_theme">Pure White</string> <string name="white_theme">Pure White</string>
<string name="locale">Locale</string> <string name="locale">Locale</string>
<string name="last_used_library_recents">Last used (Library or Recents)</string> <string name="last_used_library_recents">Last used (Library or Recents)</string>

View File

@ -111,13 +111,13 @@
<item name="android:layout_margin">@dimen/fab_margin</item> <item name="android:layout_margin">@dimen/fab_margin</item>
<item name="android:scaleType">fitCenter</item> <item name="android:scaleType">fitCenter</item>
<item name="layout_anchorGravity">bottom|right|end</item> <item name="layout_anchorGravity">bottom|right|end</item>
<item name="tint">@color/md_white_1000</item> <item name="tint">?attr/colorOnAccent</item>
<item name="android:minHeight">@dimen/fab_size</item> <item name="android:minHeight">@dimen/fab_size</item>
<item name="backgroundTint">?attr/colorAccent</item> <item name="backgroundTint">?attr/colorAccent</item>
<item name="android:tint">@color/md_white_1000</item> <item name="android:tint">?attr/colorOnAccent</item>
<item name="iconTint">@android:color/white</item> <item name="iconTint">?attr/colorOnAccent</item>
<item name="textAllCaps">false</item> <item name="textAllCaps">false</item>
<item name="android:textColor">@android:color/white</item> <item name="android:textColor">?attr/colorOnAccent</item>
</style> </style>
<style name="Theme.Widget.CardView" parent="Widget.MaterialComponents.CardView"> <style name="Theme.Widget.CardView" parent="Widget.MaterialComponents.CardView">

View File

@ -29,7 +29,8 @@
<item name="android:divider">@color/divider</item> <item name="android:divider">@color/divider</item>
<item name="android:listDivider">@drawable/line_divider</item> <item name="android:listDivider">@drawable/line_divider</item>
<item name="actionModeStyle">@style/CustomActionModeStyle</item> <item name="actionModeStyle">@style/CustomActionModeStyle</item>
<item name="colorOnAccent">@color/md_white_1000</item>
<!-- Themes --> <!-- Themes -->
<item name="windowActionModeOverlay">true</item> <item name="windowActionModeOverlay">true</item>
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.DayNight.ActionBar</item> <item name="actionBarTheme">@style/ThemeOverlay.AppCompat.DayNight.ActionBar</item>
@ -70,6 +71,7 @@
</style> </style>
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi"/> <style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi"/>
<style name="Theme.Tachiyomi.BlackAndRed" parent="Theme.Tachiyomi.Amoled"/> <style name="Theme.Tachiyomi.BlackAndRed" parent="Theme.Tachiyomi.Amoled"/>
<style name="Theme.Tachiyomi.HotPink" parent="Theme.Tachiyomi.Amoled"/>
<style name="Theme.Tachiyomi.MidnightDusk" parent="Theme.Tachiyomi"> <style name="Theme.Tachiyomi.MidnightDusk" parent="Theme.Tachiyomi">
<item name="colorPrimary">@color/dialogDuskDawn</item> <item name="colorPrimary">@color/dialogDuskDawn</item>
<item name="colorPrimaryDark">@color/dialogDuskDawn</item> <item name="colorPrimaryDark">@color/dialogDuskDawn</item>
@ -82,6 +84,20 @@
<item name="android:colorBackground">@color/backgroundDuskDawn</item> <item name="android:colorBackground">@color/backgroundDuskDawn</item>
<item name="actionBarTintColor">@color/appBarTextDuskDawn</item> <item name="actionBarTintColor">@color/appBarTextDuskDawn</item>
</style> </style>
<style name="Theme.Tachiyomi.FlatLime" parent="Theme.Tachiyomi">
<item name="colorPrimary">@color/backgroundLime</item>
<item name="colorPrimaryDark">@color/backgroundLime</item>
<item name="colorAccent">@color/colorAccentLime</item>
<item name="colorAccentText">@color/colorAccentLime</item>
<item name="colorPrimaryVariant">@color/dialogLime</item>
<item name="colorSecondary">@color/backgroundLime</item>
<item name="background">@color/backgroundLime</item>
<item name="android:colorBackground">@color/backgroundLime</item>
<item name="colorOnSurface">@color/colorAccentLimeText</item>
<item name="colorOnAccent">@color/colorOnLime</item>
</style>
<!--===============--> <!--===============-->
<!-- Launch Screen --> <!-- Launch Screen -->