mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
some cleanup
This commit is contained in:
parent
3f1263f648
commit
4b14585c57
3 changed files with 6 additions and 2 deletions
|
@ -6,6 +6,7 @@ import android.view.Window
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
enum class Background(val id: Int, val dim: Boolean = false, val blur: Boolean = false) {
|
enum class Background(val id: Int, val dim: Boolean = false, val blur: Boolean = false) {
|
||||||
TRANSPARENT(R.style.backgroundWallpaper),
|
TRANSPARENT(R.style.backgroundWallpaper),
|
||||||
DIM(R.style.backgroundWallpaper, dim = true),
|
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
|
val layoutParams: WindowManager.LayoutParams = window.attributes
|
||||||
// TODO: add a setting to change this?
|
// TODO: add a setting to change this?
|
||||||
var dimAmount = 0.7f
|
var dimAmount = 0.7f
|
||||||
var dim = this.dim
|
val dim = this.dim
|
||||||
var blur = this.blur
|
var blur = this.blur
|
||||||
|
|
||||||
// replace blur by more intense dim on old devices
|
// 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
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,6 +3,7 @@ package de.jrpie.android.launcher.preferences.theme
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
enum class ColorTheme(val id: Int) {
|
enum class ColorTheme(val id: Int) {
|
||||||
DEFAULT(R.style.colorThemeDefault),
|
DEFAULT(R.style.colorThemeDefault),
|
||||||
DARK(R.style.colorThemeDark),
|
DARK(R.style.colorThemeDark),
|
||||||
|
|
|
@ -6,6 +6,8 @@ import de.jrpie.android.launcher.R
|
||||||
/**
|
/**
|
||||||
* Changes here must also be added to @array/settings_theme_font_values
|
* Changes here must also be added to @array/settings_theme_font_values
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
enum class Font(val id: Int) {
|
enum class Font(val id: Int) {
|
||||||
HACK(R.style.fontHack),
|
HACK(R.style.fontHack),
|
||||||
SYSTEM_DEFAULT(R.style.fontSystemDefault),
|
SYSTEM_DEFAULT(R.style.fontSystemDefault),
|
||||||
|
|
Loading…
Add table
Reference in a new issue