Reworking themes

White theme is now the base, blue theme restored to its former glory, but system default for light is now only for dark blue
This commit is contained in:
Jay 2020-03-21 22:07:04 -04:00
parent 2e3aa6e39e
commit 09a8ec6ffa
22 changed files with 190 additions and 179 deletions

View File

@ -55,7 +55,7 @@ class PreferencesHelper(val context: Context) {
fun clear() = prefs.edit().clear().apply()
fun theme() = prefs.getInt(Keys.theme, 9)
fun theme() = prefs.getInt(Keys.theme, 5)
fun rotation() = rxPrefs.getInteger(Keys.rotation, 1)

View File

@ -5,13 +5,13 @@ import android.util.AttributeSet
import android.view.Gravity
import androidx.appcompat.graphics.drawable.DrawerArrowDrawable
import androidx.appcompat.widget.PopupMenu
import androidx.appcompat.widget.Toolbar
import com.google.android.material.appbar.MaterialToolbar
import eu.kanade.tachiyomi.util.view.gone
import eu.kanade.tachiyomi.util.view.visible
import kotlinx.android.synthetic.main.main_activity.view.*
class CenteredToolbar@JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : Toolbar
(context, attrs) {
class CenteredToolbar@JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
MaterialToolbar(context, attrs) {
override fun setTitle(resId: Int) {
if (navigationIcon is DrawerArrowDrawable) {

View File

@ -9,6 +9,7 @@ import eu.kanade.tachiyomi.ui.main.SearchActivity
import eu.kanade.tachiyomi.ui.security.BiometricActivity
import eu.kanade.tachiyomi.ui.security.SecureActivityDelegate
import eu.kanade.tachiyomi.util.system.LocaleHelper
import eu.kanade.tachiyomi.util.system.ThemeUtil
import uy.kohesive.injekt.injectLazy
abstract class BaseActivity : AppCompatActivity() {
@ -21,17 +22,11 @@ abstract class BaseActivity : AppCompatActivity() {
}
override fun onCreate(savedInstanceState: Bundle?) {
AppCompatDelegate.setDefaultNightMode(
when (preferences.theme()) {
1, 8 -> AppCompatDelegate.MODE_NIGHT_NO
2, 3, 4 -> AppCompatDelegate.MODE_NIGHT_YES
else -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
}
)
setTheme(when (preferences.theme()) {
3, 6 -> R.style.Theme_Tachiyomi_Amoled
4, 7 -> R.style.Theme_Tachiyomi_DarkBlue
8, 9 -> R.style.Theme_Tachiyomi_MatWhite
AppCompatDelegate.setDefaultNightMode(ThemeUtil.nightMode(preferences.theme()))
val theme = preferences.theme()
setTheme(when {
ThemeUtil.isAMOLEDTheme(theme) -> R.style.Theme_Tachiyomi_Amoled
ThemeUtil.isBlueTheme(theme) -> R.style.Theme_Tachiyomi_AllBlue
else -> R.style.Theme_Tachiyomi
})
super.onCreate(savedInstanceState)

View File

@ -79,7 +79,7 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri
val shadow: View = (pagerView.parent as ViewGroup).findViewById(R.id.shadow)
sheetBehavior?.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
override fun onSlide(bottomSheet: View, progress: Float) {
top_bar.alpha = 1 - max(0f, progress)
pill.alpha = (1 - max(0f, progress)) * 0.25f
shadow2.alpha = (1 - max(0f, progress)) * 0.25f
shadow.alpha = 1 + min(0f, progress)
updateRootPadding(progress)
@ -105,12 +105,16 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri
sheetBehavior?.skipCollapsed == false)
sheetBehavior?.state = BottomSheetBehavior.STATE_COLLAPSED
updateRootPadding(when (sheetBehavior?.state) {
BottomSheetBehavior.STATE_HIDDEN -> -1f
BottomSheetBehavior.STATE_EXPANDED -> 1f
else -> 0f
})
shadow.alpha = if (sheetBehavior?.state == BottomSheetBehavior.STATE_HIDDEN) 0f else 1f
post {
updateRootPadding(
when (sheetBehavior?.state) {
BottomSheetBehavior.STATE_HIDDEN -> -1f
BottomSheetBehavior.STATE_EXPANDED -> 1f
else -> 0f
}
)
shadow.alpha = if (sheetBehavior?.state == BottomSheetBehavior.STATE_HIDDEN) 0f else 1f
}
createTags()
clearButton.setOnClickListener { clearFilters() }
@ -123,7 +127,7 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri
pager?.updatePaddingRelative(bottom = sheetBehavior?.peekHeight ?: 0)
}
if (state == BottomSheetBehavior.STATE_EXPANDED) {
top_bar.alpha = 0f
pill.alpha = 0f
}
if (state == BottomSheetBehavior.STATE_HIDDEN) {
reSortViews()

View File

@ -78,7 +78,8 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
protected lateinit var router: Router
protected var drawerArrow: DrawerArrowDrawable? = null
var drawerArrow: DrawerArrowDrawable? = null
private set
private var searchDrawable: Drawable? = null
private var currentGestureDelegate: SwipeGestureInterface? = null
private lateinit var gestureDetector: GestureDetectorCompat
@ -91,8 +92,6 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
private var animationSet: AnimatorSet? = null
private var bottomNavHeight = 0
fun setUndoSnackBar(snackBar: Snackbar?, extraViewToCheck: View? = null) {
this.snackBar = snackBar
canDismissSnackBar = false
@ -214,11 +213,6 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
supportActionBar?.setDisplayShowCustomEnabled(true)
window.statusBarColor = ColorUtils.setAlphaComponent(
getResourceColor(
android.R.attr.colorBackground
), 175
)
content.setOnApplyWindowInsetsListener { v, insets ->
// if device doesn't support light nav bar
window.navigationBarColor = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
@ -283,11 +277,6 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
)
}
if (currentNightMode == Configuration.UI_MODE_NIGHT_NO) content.systemUiVisibility =
content.systemUiVisibility.or(
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
)
// val drawerContainer: FrameLayout = findViewById(R.id.drawer_container)
router = Conductor.attachRouter(this, container, savedInstanceState)
@ -377,11 +366,9 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
delay(duration.toLong())
delay(100)
if (Color.alpha(window?.statusBarColor ?: Color.BLACK) >= 255) window?.statusBarColor =
ColorUtils.setAlphaComponent(
getResourceColor(
android.R.attr.colorBackground
), 175
)
getResourceColor(
android.R.attr.statusBarColor
)
}
super.onSupportActionModeFinished(mode)
}

View File

@ -88,6 +88,7 @@ import eu.kanade.tachiyomi.ui.reader.ReaderActivity
import eu.kanade.tachiyomi.ui.security.SecureActivityDelegate
import eu.kanade.tachiyomi.ui.webview.WebViewActivity
import eu.kanade.tachiyomi.util.storage.getUriCompat
import eu.kanade.tachiyomi.util.system.ThemeUtil
import eu.kanade.tachiyomi.util.system.dpToPx
import eu.kanade.tachiyomi.util.system.getResourceColor
import eu.kanade.tachiyomi.util.system.launchUI
@ -97,8 +98,6 @@ import eu.kanade.tachiyomi.util.view.getText
import eu.kanade.tachiyomi.util.view.snack
import eu.kanade.tachiyomi.util.view.updateLayoutParams
import eu.kanade.tachiyomi.util.view.updatePaddingRelative
import java.io.File
import java.io.IOException
import jp.wasabeef.glide.transformations.CropSquareTransformation
import jp.wasabeef.glide.transformations.MaskTransformation
import kotlinx.android.synthetic.main.main_activity.*
@ -107,6 +106,8 @@ import kotlinx.android.synthetic.main.manga_header_item.*
import timber.log.Timber
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.io.File
import java.io.IOException
class MangaDetailsController : BaseController,
FlexibleAdapter.OnItemClickListener,
@ -337,23 +338,52 @@ class MangaDetailsController : BaseController,
override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) {
super.onChangeStarted(handler, type)
if (type == ControllerChangeType.PUSH_ENTER || type == ControllerChangeType.POP_ENTER) {
setActionBar(true)
setStatusBarAndToolbar()
} else if (type == ControllerChangeType.PUSH_EXIT || type == ControllerChangeType.POP_EXIT) {
if (router.backstack.lastOrNull()?.controller() is DialogController)
return
if (type == ControllerChangeType.POP_EXIT) {
setHasOptionsMenu(false)
setActionBar(false)
presenter.cancelScope()
}
colorAnimator?.cancel()
val colorPrimary = activity?.getResourceColor(
android.R.attr.colorBackground
val colorOnPrimary = activity?.getResourceColor(
R.attr.colorOnPrimary
) ?: Color.BLACK
(activity as MainActivity).appbar.setBackgroundColor(colorPrimary)
(activity as MainActivity).toolbar.setBackgroundColor(colorPrimary)
(activity as MainActivity).appbar.setBackgroundColor(colorOnPrimary)
(activity as MainActivity).toolbar.setBackgroundColor(colorOnPrimary)
activity?.window?.statusBarColor = ColorUtils.setAlphaComponent(colorPrimary, 175)
activity?.window?.statusBarColor = activity?.getResourceColor(android.R.attr
.statusBarColor) ?: colorOnPrimary
}
}
private fun setActionBar(forThis: Boolean) {
val currentNightMode =
activity!!.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
// if the theme is using inverted toolbar color
if (currentNightMode == Configuration.UI_MODE_NIGHT_NO && ThemeUtil.isBlueTheme(
presenter.preferences.theme()
)
) {
val iconPrimary = view?.context?.getResourceColor(
if (forThis) android.R.attr.textColorPrimary
else R.attr.actionBarTintColor
) ?: Color.BLACK
(activity as MainActivity).toolbar.setTitleTextColor(iconPrimary)
(activity as MainActivity).drawerArrow?.color = iconPrimary
(activity as MainActivity).toolbar.overflowIcon?.setTint(iconPrimary)
if (forThis) activity!!.main_content.systemUiVisibility =
activity!!.main_content.systemUiVisibility.or(
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
)
else activity!!.main_content.systemUiVisibility =
activity!!.main_content.systemUiVisibility.rem(
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
)
}
}
@ -501,6 +531,10 @@ class MangaDetailsController : BaseController,
presenter.getNextUnreadChapter() != null && !presenter.isLockedFromSearch
menu.findItem(R.id.action_mark_all_as_unread).isVisible =
!presenter.allUnread() && !presenter.isLockedFromSearch
val iconPrimary = view?.context?.getResourceColor(android.R.attr.textColorPrimary)
?: Color.BLACK
menu.findItem(R.id.action_download).icon?.mutate()?.setTint(iconPrimary)
editItem.icon?.mutate()?.setTint(iconPrimary)
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {

View File

@ -46,6 +46,7 @@ import eu.kanade.tachiyomi.ui.reader.viewer.webtoon.WebtoonViewer
import eu.kanade.tachiyomi.util.lang.plusAssign
import eu.kanade.tachiyomi.util.storage.getUriCompat
import eu.kanade.tachiyomi.util.system.GLUtil
import eu.kanade.tachiyomi.util.system.ThemeUtil
import eu.kanade.tachiyomi.util.system.getResourceColor
import eu.kanade.tachiyomi.util.system.launchUI
import eu.kanade.tachiyomi.util.system.toast
@ -151,20 +152,14 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
/**
* Called when the activity is created. Initializes the presenter and configuration.
*/
override fun onCreate(savedState: Bundle?) {
AppCompatDelegate.setDefaultNightMode(
when (preferences.theme()) {
1, 8 -> AppCompatDelegate.MODE_NIGHT_NO
2, 3, 4 -> AppCompatDelegate.MODE_NIGHT_YES
else -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
}
)
override fun onCreate(savedInstanceState: Bundle?) {
AppCompatDelegate.setDefaultNightMode(ThemeUtil.nightMode(preferences.theme()))
setTheme(when (preferences.readerTheme().getOrDefault()) {
0 -> R.style.Theme_Base_Reader_Light
1 -> R.style.Theme_Base_Reader_Dark
else -> R.style.Theme_Base_Reader
})
super.onCreate(savedState)
super.onCreate(savedInstanceState)
setContentView(R.layout.reader_activity)
setNotchCutoutMode()
@ -182,8 +177,8 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
else presenter.init(manga, chapterUrl)
}
if (savedState != null) {
menuVisible = savedState.getBoolean(::menuVisible.name)
if (savedInstanceState != null) {
menuVisible = savedInstanceState.getBoolean(::menuVisible.name)
}
config = ReaderConfig()

View File

@ -24,6 +24,9 @@ import eu.kanade.tachiyomi.ui.reader.model.ReaderPage
import eu.kanade.tachiyomi.ui.reader.model.ViewerChapters
import eu.kanade.tachiyomi.util.storage.DiskUtil
import eu.kanade.tachiyomi.util.system.ImageUtil
import java.io.File
import java.util.Date
import java.util.concurrent.TimeUnit
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
@ -36,9 +39,6 @@ import rx.schedulers.Schedulers
import timber.log.Timber
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.io.File
import java.util.Date
import java.util.concurrent.TimeUnit
/**
* Presenter used by the activity to perform background operations.

View File

@ -46,11 +46,10 @@ class SettingsGeneralController : SettingsController() {
key = Keys.theme
titleRes = R.string.pref_theme
entriesRes = arrayOf(R.string.white_theme, R.string.light_theme, R.string.dark_theme,
R.string.amoled_theme, R.string.darkblue_theme,
R.string.sysyem_white_theme, R.string.system_theme, R.string.system_amoled_theme,
R.string.amoled_theme, R.string.darkblue_theme, R.string.system_theme, R.string.system_amoled_theme,
R.string.system_darkblue_theme)
entryValues = listOf(8, 1, 2, 3, 4, 9, 5, 6, 7)
defaultValue = 9
entryValues = listOf(1, 8, 2, 3, 4, 5, 6, 7)
defaultValue = 5
onChange {
activity?.recreate()

View File

@ -0,0 +1,21 @@
package eu.kanade.tachiyomi.util.system
import androidx.appcompat.app.AppCompatDelegate
object ThemeUtil {
fun isBlueTheme(theme: Int): Boolean {
return theme == 4 || theme == 8 || theme == 7
}
fun isAMOLEDTheme(theme: Int): Boolean {
return theme == 3 || theme == 6
}
fun nightMode(theme: Int): Int {
return when (theme) {
1, 8 -> AppCompatDelegate.MODE_NIGHT_NO
2, 3, 4 -> AppCompatDelegate.MODE_NIGHT_YES
else -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
}
}
}

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorAccent">
android:color="@color/colorAccent">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="?attr/colorAccent" />
<solid android:color="@color/colorAccent" />
<corners android:radius="16dp" />
</shape>
</item>
@ -24,7 +24,7 @@
<size
android:width="32dp"
android:height="32dp" />
<solid android:color="?attr/colorAccent" />
<solid android:color="@color/colorAccent" />
</shape>
</item>
</selector>

View File

@ -83,26 +83,17 @@
</LinearLayout>
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
<ImageView
android:id="@+id/pill"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:alpha="0.25"
android:contentDescription="@string/drag_handle"
android:src="@drawable/draggable_pill"
android:tint="?android:attr/textColorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/pill"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:alpha="0.25"
android:contentDescription="@string/drag_handle"
android:src="@drawable/draggable_pill"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.kanade.tachiyomi.ui.library.filter.FilterBottomSheet>

View File

@ -24,7 +24,8 @@
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/colorBackground"
android:theme="?attr/actionBarTheme"
android:background="?attr/colorOnPrimary"
android:stateListAnimator="@null"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
@ -34,7 +35,7 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?android:attr/colorBackground">
android:background="?attr/colorOnPrimary">
<LinearLayout
android:id="@+id/title_layout"

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Tachiyomi" parent="Theme.Base">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="md_button_casing">literal</item>
</style>
</resources>

View File

@ -3,7 +3,7 @@
<!-- Application Colors -->
<color name="colorPrimary">#212121</color>
<color name="colorPrimaryDark">#212121</color>
<color name="colorPrimaryInactive">@color/md_white_1000_76</color>
<color name="drawerHighlight">@color/md_white_1000_12</color>
<color name="drawerPrimary">#3399FF</color>
@ -15,9 +15,8 @@
<color name="dialogBackground">#171717</color>
<color name="colorAccent">#3399FF</color>
<color name="splashBackground">#212121</color>
<color name="mainStatus">#AF1C1C1D</color>
<color name="actionModeShadow">@color/md_white_1000_38</color>
<color name="tabBarIconHighlight">@color/colorAccent</color>
<color name="tabInactive">@color/md_white_1000_76</color>
<color name="textColorPrimary">@color/md_white_1000</color>
<color name="textColorSecondary">@color/md_white_1000_70</color>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.ActionBar.DayNight" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<style name="Theme.ActionBar.Dark.DayNight"
parent="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
<item name="popupTheme">@style/ThemeOverlay.MaterialComponents.Dark</item>
</style>
</resources>

View File

@ -1,46 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Base.Reader" parent="Theme.Base">
<item name="colorPrimary">@color/darkPrimaryTranslucent</item>
<item name="colorPrimaryDark">@color/darkPrimaryTranslucent</item>
<item name="android:statusBarColor">?colorPrimaryDark</item>
<item name="android:navigationBarColor">?colorPrimaryDark</item>
<item name="android:colorBackground">@color/readerDarkBackground</item>
</style>
<style name="Theme.Tachiyomi.MatWhite" parent="Theme.Tachiyomi">
<item name="tabBarIconColor">@color/tabBarIconHighlight</item>
<item name="tabBarIconInactive">@color/md_white_1000_76</item>
</style>
<style name="Theme.Tachiyomi" parent="Theme.Base">
<item name="android:windowLightStatusBar">false</item>
</style>
<style name="Theme.Tachiyomi.DarkBlue" parent="Theme.Tachiyomi">
<item name="colorPrimary">#54759E</item>
<item name="colorPrimaryDark">#54759E</item>
<item name="badgeColor">@color/material_red_accent_700</item>
<item name="tabBarIconColor">@color/md_white_1000</item>
</style>
<style name="Theme.Base.Reader" parent="Theme.Base">
<item name="colorPrimary">@color/darkPrimaryTranslucent</item>
<item name="colorPrimaryDark">@color/darkPrimaryTranslucent</item>
<item name="android:statusBarColor">?colorPrimaryDark</item>
<item name="android:navigationBarColor">?colorPrimaryDark</item>
<item name="android:colorBackground">@color/readerDarkBackground</item>
</style>
<!--==============-->
<!-- Amoled Theme -->
<!--==============-->
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi">
<item name="colorPrimary">@color/colorAmoledPrimary</item>
<item name="colorPrimaryDark">@color/colorAmoledPrimary</item>
<item name="android:colorBackground">@color/md_black_1000</item>
<item name="snackbar_background">@color/trueSnackbarBackground</item>
<item name="snackbar_text">@color/textColorPrimary</item>
<!--==============-->
<!-- Amoled Theme -->
<!--==============-->
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi">
<item name="colorPrimary">@color/colorAmoledPrimary</item>
<item name="colorOnPrimary">@color/colorAmoledPrimary</item>
<item name="colorPrimaryDark">@color/colorAmoledPrimary</item>
<item name="android:colorBackground">@color/md_black_1000</item>
<item name="android:statusBarColor">@color/blackStatus</item>
<item name="snackbar_background">@color/trueSnackbarBackground</item>
<item name="snackbar_text">@color/textColorPrimary</item>
<!-- Custom Attributes-->
<item name="selectable_list_drawable">@drawable/list_item_selector</item>
<item name="selectable_library_drawable">@drawable/library_item_selector_amoled</item>
<item name="background_card">@color/colorAmoledPrimary</item>
<!-- Custom Attributes-->
<item name="selectable_list_drawable">@drawable/list_item_selector</item>
<item name="selectable_library_drawable">@drawable/library_item_selector_amoled</item>
<item name="background_card">@color/colorAmoledPrimary</item>
<!-- Material Dialog colors -->
<item name="md_color_title">@color/textColorPrimary</item>
<item name="md_color_content">@color/textColorSecondary</item>
<item name="md_color_button_text">@color/colorAccent</item>
<item name="md_background_color">@color/colorAmoledPrimary</item>
<item name="md_corner_radius">16dp</item>
</style>
<!-- Material Dialog colors -->
<item name="md_color_title">@color/textColorPrimary</item>
<item name="md_color_content">@color/textColorSecondary</item>
<item name="md_color_button_text">@color/colorAccent</item>
<item name="md_background_color">@color/colorAmoledPrimary</item>
<item name="md_corner_radius">16dp</item>
</style>
<style name="Theme.Splash" parent="Theme.Tachiyomi">
<item name="android:windowLightStatusBar">false</item>
</style>
</resources>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- values-v29/themes.xml -->
<style name="Theme.Tachiyomi" parent="Theme.Base">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="md_button_casing">literal</item>
</style>
</resources>

View File

@ -1,15 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Application Colors -->
<color name="colorPrimary">#54759E</color>
<color name="colorPrimary">@color/md_white_1000</color>
<color name="colorPrimaryInactive">#C2424242</color>
<color name="drawerColor">#54759E</color>
<color name="colorPrimaryDark">#54759E</color>
<color name="purePrimary">@color/md_white_1000</color>
<color name="colorPrimaryDark">@color/md_white_1000</color>
<color name="drawerHighlight">@color/md_black_1000_12</color>
<color name="drawerPrimary">@color/colorPrimary</color>
<color name="drawerPrimary">@color/bluePrimary</color>
<color name="bluePrimary">#54759E</color>
<color name="mainStatus">#AFFAFAFA</color>
<color name="blueStatus">#AF54759E</color>
<color name="blackStatus">#AF000000</color>
<color name="cardBackground">#FFFFFF</color>
<color name="splashBackground">@color/colorPrimary</color>
<color name="splashBackground">@color/bluePrimary</color>
<color name="snackbarBackground">#323232</color>
<color name="trueSnackbarBackground">#323232</color>
<color name="dialogBackground">@color/md_white_1000</color>
@ -34,8 +37,6 @@
<color name="divider">@color/md_black_1000_12</color>
<color name="oldNavBarBackground">#B3FFFFFF</color>
<color name="badgeColor">@color/material_red_accent_700</color>
<color name="tabBarIconHighlight">@color/md_white_1000</color>
<color name="tabInactive">@color/md_white_1000_50</color>
<color name="preference_fallback_accent_color">@color/colorAccent</color>
<color name="darkPrimaryColor">#212121</color>

View File

@ -174,13 +174,12 @@
<string name="pref_theme">App theme</string>
<string name="light_theme">Light Blue</string>
<string name="dark_theme">Dark</string>
<string name="amoled_theme">AMOLED dark</string>
<string name="darkblue_theme">Dark blue</string>
<string name="system_theme">System default (Light + Dark)</string>
<string name="amoled_theme">AMOLED Black</string>
<string name="darkblue_theme">Dark Blue</string>
<string name="system_theme">System default</string>
<string name="white_theme">Pure White</string>
<string name="sysyem_white_theme">System default (White + Dark)</string>
<string name="system_amoled_theme">System default (Light + AMOLED)</string>
<string name="system_darkblue_theme">System default (All blue)</string>
<string name="system_amoled_theme">System default (White + Black)</string>
<string name="system_darkblue_theme">System default (All Blue)</string>
<string name="pref_start_screen">Start screen</string>
<string name="pref_language">Language</string>
<string name="system_default">System default</string>

View File

@ -5,7 +5,8 @@
<!--Toolbars-->
<!--========-->
<style name="Theme.ActionBar.DayNight" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<style name="Theme.ActionBar.Dark.DayNight"
parent="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
<item name="popupTheme">@style/ThemeOverlay.MaterialComponents.Light</item>
</style>
@ -15,6 +16,7 @@
<style name="Theme.ActionBar.Tab" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="CustomActionModeStyle" parent="Base.Widget.AppCompat.ActionMode">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="background">@drawable/action_mode_bg</item>
</style>

View File

@ -10,7 +10,7 @@
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorOnPrimary">@color/md_white_1000</item>
<item name="colorOnPrimary">@color/background</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:textColorPrimary">@color/textColorPrimary</item>
@ -24,8 +24,8 @@
<item name="android:divider">@color/divider</item>
<item name="android:listDivider">@drawable/line_divider_light</item>
<item name="actionModeStyle">@style/CustomActionModeStyle</item>
<item name="tabBarIconColor">@color/tabBarIconHighlight</item>
<item name="tabBarIconInactive">@color/tabInactive</item>
<item name="tabBarIconColor">?colorAccent</item>
<item name="tabBarIconInactive">@color/colorPrimaryInactive</item>
<!-- Themes -->
@ -47,7 +47,7 @@
<item name="actionBarTintColor">@color/textColorPrimary</item>
<item name="badgeColor">@color/badgeColor</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@color/mainStatus</item>
<item name="android:navigationBarColor">#B3000000</item>
<item name="android:colorEdgeEffect">@color/colorAccent</item>
@ -56,21 +56,23 @@
<item name="md_color_content">@color/textColorSecondary</item>
<item name="md_color_button_text">@color/colorAccent</item>
<item name="md_background_color">@color/dialog</item>
<item name="md_button_casing">literal</item>
<item name="md_corner_radius">16dp</item>
<item name="android:windowLightStatusBar">true</item>
</style>
<style name="Theme.Tachiyomi" parent="Theme.Base"/>
<style name="Theme.Tachiyomi.MatWhite" parent="Theme.Tachiyomi">
<item name="colorPrimary">@color/purePrimary</item>
<item name="colorPrimaryDark">@color/purePrimary</item>
<item name="colorOnPrimary">@color/colorPrimary</item>
<item name="tabBarIconColor">@color/colorPrimary</item>
<item name="tabBarIconInactive">@color/colorPrimaryInactive</item>
<item name="android:statusBarColor">@color/md_black_1000_54</item>
<item name="actionBarTintColor">@color/textColorPrimary</item>
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.DayNight.ActionBar</item>
<style name="Theme.Tachiyomi.AllBlue" parent="Theme.Tachiyomi">
<item name="colorPrimary">@color/bluePrimary</item>
<item name="colorPrimaryDark">@color/bluePrimary</item>
<item name="colorOnPrimary">@color/bluePrimary</item>
<item name="tabBarIconColor">@color/md_white_1000</item>
<item name="tabBarIconInactive">@color/md_white_1000_50</item>
<item name="android:statusBarColor">@color/blueStatus</item>
<item name="actionBarTintColor">@color/md_white_1000</item>
<item name="actionBarTheme">@style/Theme.ActionBar.Dark.DayNight</item>
<item name="android:windowLightStatusBar">false</item>
</style>
<style name="Theme.Tachiyomi.DarkBlue" parent="Theme.Tachiyomi"/>
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi"/>
<!--==============-->
<!-- Reader Theme -->
@ -143,7 +145,7 @@
<!-- Themes -->
<item name="windowActionModeOverlay">true</item>
<item name="actionBarTheme">@style/Theme.ActionBar.DayNight</item>
<item name="actionBarTheme">@style/Theme.ActionBar.Dark.DayNight</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
<item name="alertDialogTheme">@style/Theme.AlertDialog.DayNight</item>
@ -168,7 +170,6 @@
<item name="android:windowBackground">@drawable/splash_background</item>
<item name="android:statusBarColor">@color/splashBackground</item>
<item name="android:navigationBarColor">@color/splashBackground</item>
<item name="android:windowLightStatusBar">true</item>
</style>
</resources>