Fix glow preventing hit tests (#53)

This commit is contained in:
Robb Böhnke 2023-12-16 05:55:55 +01:00 committed by GitHub
parent 75b716d86a
commit cc014eba4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,6 +76,7 @@ internal struct GlowModifier: ViewModifier, Animatable {
.opacity(ramp(amount))
.blendMode(.sourceAtop)
.brightness(ramp(abs(amount)) * 0.1)
.allowsHitTesting(false)
}
.compositingGroup()
.shadow(color: color.opacity(shadowOpacity / 1.2), radius: amount * radius / 4.0, x: 0, y: 0)