feat: Blur toggle
This commit is contained in:
parent
07662a91f4
commit
8fb6357fb5
7 changed files with 128 additions and 30 deletions
|
@ -96,8 +96,21 @@ class UserInterfaceSettingsActivity : AppCompatActivity() {
|
|||
PrefManager.setVal(PrefName.AnimationSpeed, map[value] ?: 1f)
|
||||
restartApp()
|
||||
}
|
||||
|
||||
|
||||
binding.uiSettingsBlurBanners.isChecked = PrefManager.getVal(PrefName.BlurBanners)
|
||||
binding.uiSettingsBlurBanners.setOnCheckedChangeListener { _, isChecked ->
|
||||
PrefManager.setVal(PrefName.BlurBanners, isChecked)
|
||||
restartApp()
|
||||
}
|
||||
binding.uiSettingsBlurRadius.value = (PrefManager.getVal(PrefName.BlurRadius) as Float)
|
||||
binding.uiSettingsBlurRadius.addOnChangeListener { _, value, _ ->
|
||||
PrefManager.setVal(PrefName.BlurRadius, value)
|
||||
restartApp()
|
||||
}
|
||||
binding.uiSettingsBlurSampling.value = (PrefManager.getVal(PrefName.BlurSampling) as Float)
|
||||
binding.uiSettingsBlurSampling.addOnChangeListener { _, value, _ ->
|
||||
PrefManager.setVal(PrefName.BlurSampling, value)
|
||||
restartApp()
|
||||
}
|
||||
}
|
||||
|
||||
private fun restartApp() {
|
||||
|
|
|
@ -47,6 +47,9 @@ enum class PrefName(val data: Pref) { //TODO: Split this into multiple files
|
|||
ShowYtButton(Pref(Location.UI, Boolean::class, true)),
|
||||
AnimeDefaultView(Pref(Location.UI, Int::class, 0)),
|
||||
MangaDefaultView(Pref(Location.UI, Int::class, 0)),
|
||||
BlurBanners(Pref(Location.UI, Boolean::class, true)),
|
||||
BlurRadius(Pref(Location.UI, Float::class, 2f)),
|
||||
BlurSampling(Pref(Location.UI, Float::class, 2f)),
|
||||
ImmersiveMode(Pref(Location.UI, Boolean::class, false)),
|
||||
SmallView(Pref(Location.UI, Boolean::class, true)),
|
||||
DefaultStartUpTab(Pref(Location.UI, Int::class, 1)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue