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:
@@ -25,10 +25,8 @@ import com.google.android.material.elevation.ElevationOverlayProvider
|
||||
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import eu.kanade.tachiyomi.util.system.isNightMode
|
||||
|
||||
/**
|
||||
* Returns coordinates of view.
|
||||
@@ -186,7 +184,7 @@ inline fun ChipGroup.setChips(
|
||||
* Applies elevation overlay to a MaterialCardView
|
||||
*/
|
||||
inline fun MaterialCardView.applyElevationOverlay() {
|
||||
if (Injekt.get<PreferencesHelper>().isDarkMode()) {
|
||||
if (context.isNightMode()) {
|
||||
val provider = ElevationOverlayProvider(context)
|
||||
setCardBackgroundColor(provider.compositeOverlay(cardBackgroundColor.defaultColor, cardElevation))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user