Remove blur when adjust color filter

This commit is contained in:
tarsin committed 2022-12-14 10:58:32 +08:00
1 parent 0474e2c0f5
commit 9ea44ff59a
1 file changed
+6 -1
@@ -1,6 +1,7 @@
package eu.kanade.tachiyomi.ui.reader.setting
import android.animation.ValueAnimator
import android.os.Build
import android.os.Bundle
import com.google.android.material.tabs.TabLayout
import com.hippo.ehviewer.R
@@ -32,7 +33,11 @@ class ReaderSettingsSheet(
ValueAnimator.ofFloat(sheetBackgroundDim, 0f).also { valueAnimator ->
valueAnimator.duration = 250
valueAnimator.addUpdateListener {
window?.setDimAmount(it.animatedValue as Float)
window?.run {
setDimAmount(it.animatedValue as Float)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
attributes.blurBehindRadius = (it.animatedValue as Float * 50).toInt()
}
}
}
}