mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
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:
parent
95c9fcd292
commit
679c90130d
3 changed files with 14 additions and 2 deletions
|
@ -16,7 +16,13 @@ enum class Background(val id: Int, val dim: Boolean = false, val blur: Boolean =
|
||||||
;
|
;
|
||||||
|
|
||||||
fun applyToTheme(theme: Resources.Theme) {
|
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) {
|
fun applyToWindow(window: Window) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ enum class ColorTheme(
|
||||||
R.style.colorThemeLight,
|
R.style.colorThemeLight,
|
||||||
R.string.settings_theme_color_theme_item_light,
|
R.string.settings_theme_color_theme_item_light,
|
||||||
R.style.textShadowLight,
|
R.style.textShadowLight,
|
||||||
{ false }),
|
{ true }),
|
||||||
DYNAMIC(
|
DYNAMIC(
|
||||||
R.style.colorThemeDynamic,
|
R.style.colorThemeDynamic,
|
||||||
R.string.settings_theme_color_theme_item_dynamic,
|
R.string.settings_theme_color_theme_item_dynamic,
|
||||||
|
|
|
@ -34,6 +34,12 @@ class SettingsFragmentLauncher : PreferenceFragmentCompat() {
|
||||||
)
|
)
|
||||||
val timeVisible = LauncherPreferences.clock().timeVisible()
|
val timeVisible = LauncherPreferences.clock().timeVisible()
|
||||||
showSeconds?.isVisible = 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() {
|
override fun onStart() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue