mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-24 17:01:51 +01:00
Color fixing
For extensions button on lower androids and highlighted tab in dark theme
This commit is contained in:
parent
f0f889e6bb
commit
7544a4d2db
@ -1,10 +1,8 @@
|
|||||||
package eu.kanade.tachiyomi.ui.extension
|
package eu.kanade.tachiyomi.ui.extension
|
||||||
|
|
||||||
import android.content.res.ColorStateList
|
import android.content.res.ColorStateList
|
||||||
import android.graphics.Color
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat
|
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.glide.GlideApp
|
import eu.kanade.tachiyomi.data.glide.GlideApp
|
||||||
import eu.kanade.tachiyomi.extension.model.Extension
|
import eu.kanade.tachiyomi.extension.model.Extension
|
||||||
@ -12,6 +10,7 @@ import eu.kanade.tachiyomi.extension.model.InstallStep
|
|||||||
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
|
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
|
||||||
import eu.kanade.tachiyomi.ui.base.holder.SlicedHolder
|
import eu.kanade.tachiyomi.ui.base.holder.SlicedHolder
|
||||||
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||||
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
import io.github.mthli.slice.Slice
|
import io.github.mthli.slice.Slice
|
||||||
import kotlinx.android.synthetic.main.extension_card_item.*
|
import kotlinx.android.synthetic.main.extension_card_item.*
|
||||||
|
|
||||||
@ -64,6 +63,7 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
|
|||||||
|
|
||||||
//background = VectorDrawableCompat.create(resources!!, R.drawable.button_bg_transparent, null)
|
//background = VectorDrawableCompat.create(resources!!, R.drawable.button_bg_transparent, null)
|
||||||
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_text_state))
|
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_text_state))
|
||||||
|
backgroundTintList = ContextCompat.getColorStateList(context, R.drawable.button_bg_transparent)
|
||||||
|
|
||||||
val extension = item.extension
|
val extension = item.extension
|
||||||
|
|
||||||
@ -84,14 +84,12 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
|
|||||||
when {
|
when {
|
||||||
extension.hasUpdate -> {
|
extension.hasUpdate -> {
|
||||||
isActivated = true
|
isActivated = true
|
||||||
// backgroundTintList = ColorStateList(arrayOf(intArrayOf(0)), intArrayOf(Color
|
backgroundTintList = ColorStateList.valueOf(
|
||||||
//.BLACK))
|
context.getResourceColor(R.attr.colorAccent))
|
||||||
setText(R.string.ext_update)
|
setText(R.string.ext_update)
|
||||||
}
|
}
|
||||||
extension.isObsolete -> {
|
extension.isObsolete -> {
|
||||||
// Red outline
|
// Red outline
|
||||||
// background = VectorDrawableCompat.create(resources, R.drawable
|
|
||||||
// .button_bg_error, null)
|
|
||||||
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_bg_error))
|
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_bg_error))
|
||||||
|
|
||||||
setText(R.string.ext_obsolete)
|
setText(R.string.ext_obsolete)
|
||||||
|
@ -49,8 +49,8 @@
|
|||||||
android:theme="@style/Theme.ActionBar.Tab"
|
android:theme="@style/Theme.ActionBar.Tab"
|
||||||
android:background="?colorPrimary"
|
android:background="?colorPrimary"
|
||||||
app:tabRippleColor="@color/rippleColor"
|
app:tabRippleColor="@color/rippleColor"
|
||||||
app:tabIndicatorColor="?attr/tabBarIconColor"
|
app:tabIndicatorColor="?attr/actionBarTintColor"
|
||||||
app:tabTextColor="?attr/tabBarIconColor"
|
app:tabTextColor="?attr/actionBarTintColor"
|
||||||
app:tabInlineLabel="true"
|
app:tabInlineLabel="true"
|
||||||
app:tabGravity="center"
|
app:tabGravity="center"
|
||||||
app:tabMode="auto"
|
app:tabMode="auto"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<color name="purePrimary">#212121</color>
|
<color name="purePrimary">#212121</color>
|
||||||
<color name="splashBackground">#212121</color>
|
<color name="splashBackground">#212121</color>
|
||||||
<color name="actionModeShadow">@color/md_white_1000_38</color>
|
<color name="actionModeShadow">@color/md_white_1000_38</color>
|
||||||
<color name="badgeColor">#3399FF</color>
|
<color name="tabBarIconHighlight">@color/colorAccent</color>
|
||||||
|
|
||||||
<color name="textColorPrimary">@color/md_white_1000</color>
|
<color name="textColorPrimary">@color/md_white_1000</color>
|
||||||
<color name="textColorSecondary">@color/md_white_1000_70</color>
|
<color name="textColorSecondary">@color/md_white_1000_70</color>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Tachiyomi.MatWhite" parent="Theme.Tachiyomi">
|
<style name="Theme.Tachiyomi.MatWhite" parent="Theme.Tachiyomi">
|
||||||
<item name="tabBarIconColor">@color/md_white_1000</item>
|
<item name="tabBarIconColor">@color/tabBarIconHighlight</item>
|
||||||
<item name="tabBarIconInactive">@color/md_white_1000_76</item>
|
<item name="tabBarIconInactive">@color/md_white_1000_76</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -17,6 +17,7 @@
|
|||||||
<item name="colorPrimary">#54759E</item>
|
<item name="colorPrimary">#54759E</item>
|
||||||
<item name="colorPrimaryDark">#54759E</item>
|
<item name="colorPrimaryDark">#54759E</item>
|
||||||
<item name="badgeColor">@color/material_red_accent_700</item>
|
<item name="badgeColor">@color/material_red_accent_700</item>
|
||||||
|
<item name="tabBarIconColor">@color/md_white_1000</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!--==============-->
|
<!--==============-->
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
<item name="colorOnPrimary">@color/colorPrimary</item>
|
<item name="colorOnPrimary">@color/colorPrimary</item>
|
||||||
<item name="actionBarTintColor">@color/textColorPrimary</item>
|
<item name="actionBarTintColor">@color/textColorPrimary</item>
|
||||||
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.DayNight.ActionBar</item>
|
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.DayNight.ActionBar</item>
|
||||||
<item name="tabBarIconColor">@color/colorPrimary</item>
|
<item name="tabBarIconColor">@color/colorAccent</item>
|
||||||
<item name="tabBarIconInactive">@color/colorPrimaryInactive</item>
|
<item name="tabBarIconInactive">@color/colorPrimaryInactive</item>
|
||||||
<item name="badgeColor">@color/colorAccent</item>
|
|
||||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
@ -32,6 +32,7 @@
|
|||||||
<color name="divider">@color/md_black_1000_12</color>
|
<color name="divider">@color/md_black_1000_12</color>
|
||||||
<color name="oldNavBarBackground">#B3FFFFFF</color>
|
<color name="oldNavBarBackground">#B3FFFFFF</color>
|
||||||
<color name="badgeColor">@color/material_red_accent_700</color>
|
<color name="badgeColor">@color/material_red_accent_700</color>
|
||||||
|
<color name="tabBarIconHighlight">@color/md_white_1000</color>
|
||||||
|
|
||||||
<color name="preference_fallback_accent_color">@color/colorAccent</color>
|
<color name="preference_fallback_accent_color">@color/colorAccent</color>
|
||||||
<color name="darkPrimaryColor">#212121</color>
|
<color name="darkPrimaryColor">#212121</color>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<item name="android:divider">@color/divider</item>
|
<item name="android:divider">@color/divider</item>
|
||||||
<item name="android:listDivider">@drawable/line_divider_light</item>
|
<item name="android:listDivider">@drawable/line_divider_light</item>
|
||||||
<item name="actionModeStyle">@style/CustomActionModeStyle</item>
|
<item name="actionModeStyle">@style/CustomActionModeStyle</item>
|
||||||
<item name="tabBarIconColor">@color/md_white_1000</item>
|
<item name="tabBarIconColor">@color/tabBarIconHighlight</item>
|
||||||
<item name="tabBarIconInactive">@color/md_white_1000_76</item>
|
<item name="tabBarIconInactive">@color/md_white_1000_76</item>
|
||||||
|
|
||||||
|
|
||||||
@ -68,7 +68,6 @@
|
|||||||
<item name="tabBarIconColor">@color/colorPrimary</item>
|
<item name="tabBarIconColor">@color/colorPrimary</item>
|
||||||
<item name="tabBarIconInactive">@color/colorPrimaryInactive</item>
|
<item name="tabBarIconInactive">@color/colorPrimaryInactive</item>
|
||||||
<item name="android:statusBarColor">@color/md_black_1000_54</item>
|
<item name="android:statusBarColor">@color/md_black_1000_54</item>
|
||||||
<item name="badgeColor">@color/colorAccent</item>
|
|
||||||
</style>
|
</style>
|
||||||
<style name="Theme.Tachiyomi.DarkBlue" parent="Theme.Tachiyomi"/>
|
<style name="Theme.Tachiyomi.DarkBlue" parent="Theme.Tachiyomi"/>
|
||||||
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi"/>
|
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user