mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 14:31:30 +01:00
don't dim background when using light theme
This commit is contained in:
parent
68fa4190f3
commit
ef96ba720c
1 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,7 @@ import android.os.Build
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
|
|
||||||
@Suppress("unused")
|
@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) {
|
||||||
|
@ -31,6 +32,10 @@ enum class Background(val id: Int, val dim: Boolean = false, val blur: Boolean =
|
||||||
dimAmount += 0.1f
|
dimAmount += 0.1f
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (LauncherPreferences.theme().colorTheme() == ColorTheme.LIGHT) {
|
||||||
|
dimAmount = 0f
|
||||||
|
}
|
||||||
|
|
||||||
if (dim) {
|
if (dim) {
|
||||||
layoutParams.dimAmount = dimAmount
|
layoutParams.dimAmount = dimAmount
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND)
|
window.addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND)
|
||||||
|
|
Loading…
Add table
Reference in a new issue