Merge light and dark themes (#5470)

* Merge AMOLED and regular dark themes

This allows all variants of dark themes to use black backgrounds as a
separate preference.

* Merge light and dark themes

* Fix ReaderSeekBar color on Dark Blue theme

* Color fixes

* Fix Dark Blue bars ripple

* Simplify night mode check
This commit is contained in:
Ivan Iskandar
2021-07-02 19:44:04 +07:00
committed by GitHub
parent 82f3677168
commit 0eadc028b6
71 changed files with 408 additions and 785 deletions

View File

@@ -9,11 +9,9 @@ import android.view.View
import android.view.ViewGroup
import com.google.android.material.bottomsheet.BottomSheetDialog
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.util.system.displayCompat
import eu.kanade.tachiyomi.util.system.isNightMode
import eu.kanade.tachiyomi.util.view.setNavigationBarTransparentCompat
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
abstract class BaseBottomSheetDialog(context: Context) : BottomSheetDialog(context) {
@@ -45,7 +43,7 @@ abstract class BaseBottomSheetDialog(context: Context) : BottomSheetDialog(conte
window?.setNavigationBarTransparentCompat(context)
val bottomSheet = rootView.parent as ViewGroup
var flags = bottomSheet.systemUiVisibility
flags = if (Injekt.get<PreferencesHelper>().isDarkMode()) {
flags = if (context.isNightMode()) {
flags and View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv()
} else {
flags or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR