mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-27 15:11:01 +00:00
feat: Blur toggle
This commit is contained in:
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user