some cleanup

This commit is contained in:
Josia Pietsch 2024-11-02 00:51:44 +01:00
parent 3f1263f648
commit 4b14585c57
Signed by: jrpie
GPG key ID: E70B571D66986A2D
3 changed files with 6 additions and 2 deletions

View file

@ -6,6 +6,7 @@ import android.view.Window
import android.view.WindowManager
import de.jrpie.android.launcher.R
@Suppress("unused")
enum class Background(val id: Int, val dim: Boolean = false, val blur: Boolean = false) {
TRANSPARENT(R.style.backgroundWallpaper),
DIM(R.style.backgroundWallpaper, dim = true),
@ -21,7 +22,7 @@ enum class Background(val id: Int, val dim: Boolean = false, val blur: Boolean =
val layoutParams: WindowManager.LayoutParams = window.attributes
// TODO: add a setting to change this?
var dimAmount = 0.7f
var dim = this.dim
val dim = this.dim
var blur = this.blur
// replace blur by more intense dim on old devices
@ -47,6 +48,6 @@ enum class Background(val id: Int, val dim: Boolean = false, val blur: Boolean =
}
}
window.setAttributes(layoutParams)
window.attributes = layoutParams
}
}

View file

@ -3,6 +3,7 @@ package de.jrpie.android.launcher.preferences.theme
import android.content.res.Resources
import de.jrpie.android.launcher.R
@Suppress("unused")
enum class ColorTheme(val id: Int) {
DEFAULT(R.style.colorThemeDefault),
DARK(R.style.colorThemeDark),

View file

@ -6,6 +6,8 @@ import de.jrpie.android.launcher.R
/**
* Changes here must also be added to @array/settings_theme_font_values
*/
@Suppress("unused")
enum class Font(val id: Int) {
HACK(R.style.fontHack),
SYSTEM_DEFAULT(R.style.fontSystemDefault),