@@ -25,6 +25,7 @@ public struct GlassBackgroundModifier: ViewModifier {
2525 let displayMode : GlassBackgroundDisplayMode
2626 let radius : CGFloat
2727 let color : Color
28+ let colorOpacity : Double
2829 let material : Material
2930 let gradientOpacity : Double
3031 let gradientStyle : GradientStyle
@@ -41,6 +42,7 @@ public struct GlassBackgroundModifier: ViewModifier {
4142 displayMode: GlassBackgroundDisplayMode ,
4243 radius: CGFloat ,
4344 color: Color ,
45+ colorOpacity: Double ,
4446 material: Material ,
4547 gradientOpacity: Double ,
4648 gradientStyle: GradientStyle ,
@@ -55,6 +57,7 @@ public struct GlassBackgroundModifier: ViewModifier {
5557 self . displayMode = displayMode
5658 self . radius = radius
5759 self . color = color
60+ self . colorOpacity = colorOpacity
5861 self . material = material
5962 self . gradientOpacity = gradientOpacity
6063 self . gradientStyle = gradientStyle
@@ -80,13 +83,13 @@ public struct GlassBackgroundModifier: ViewModifier {
8083 . tint ( color)
8184 } else {
8285 content
83- . glassEffect ( . regular. tint ( color. opacity ( 0.1 ) ) . interactive ( ) , in: . rect( cornerRadius: radius) )
86+ . glassEffect ( . regular. tint ( color. opacity ( colorOpacity ) ) . interactive ( ) , in: . rect( cornerRadius: radius) )
8487 . cornerRadius ( radius)
8588 . shadow ( color: shadowColor. opacity ( shadowOpacity) , radius: shadowRadius, x: shadowX, y: shadowY)
8689 }
8790 } else {
8891 content
89- . background ( color. opacity ( 0.1 ) )
92+ . background ( color. opacity ( colorOpacity ) )
9093 . background ( material) // Use the specified material for the frosted glass base
9194 . cornerRadius ( radius) // Rounds the corners
9295 . overlay (
0 commit comments