re-enable the light theme

close #75
when the light theme is selected, the background is always set to solid, to prevent problems with dark wallpapers
This commit is contained in:
Josia Pietsch 2025-01-21 23:05:49 +01:00
parent 95c9fcd292
commit 679c90130d
Signed by: jrpie
GPG key ID: E70B571D66986A2D
3 changed files with 14 additions and 2 deletions

View file

@ -16,7 +16,13 @@ enum class Background(val id: Int, val dim: Boolean = false, val blur: Boolean =
;
fun applyToTheme(theme: Resources.Theme) {
theme.applyStyle(id, true)
var background = this
// force a solid background when using the light theme
if (LauncherPreferences.theme().colorTheme() == ColorTheme.LIGHT) {
background = SOLID
}
theme.applyStyle(background.id, true)
}
fun applyToWindow(window: Window) {

View file

@ -26,7 +26,7 @@ enum class ColorTheme(
R.style.colorThemeLight,
R.string.settings_theme_color_theme_item_light,
R.style.textShadowLight,
{ false }),
{ true }),
DYNAMIC(
R.style.colorThemeDynamic,
R.string.settings_theme_color_theme_item_dynamic,

View file

@ -34,6 +34,12 @@ class SettingsFragmentLauncher : PreferenceFragmentCompat() {
)
val timeVisible = LauncherPreferences.clock().timeVisible()
showSeconds?.isVisible = timeVisible
val background = findPreference<androidx.preference.Preference>(
LauncherPreferences.theme().keys().background()
)
val lightTheme = LauncherPreferences.theme().colorTheme() == ColorTheme.LIGHT
background?.isVisible = !lightTheme
}
override fun onStart() {