Skip to content

Commit dc4f2f4

Browse files
committed
Update props
1 parent 54f0f9a commit dc4f2f4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Sources/SwiftGlass/GlassBackgroundModifier.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ public struct GlassBackgroundModifier: ViewModifier {
7272
public func body(content: Content) -> some View {
7373
if #available(iOS 26.0, macOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *) {
7474
content
75-
.glassEffect()
75+
.background(material)
76+
.glassEffect(in: .rect(cornerRadius: radius))
77+
.cornerRadius(radius)
78+
.shadow(color: shadowColor.opacity(shadowOpacity), radius: shadowRadius, x: shadowX, y: shadowY)
7679
} else {
7780
content
7881
.background(material) // Use the specified material for the frosted glass base
@@ -89,7 +92,7 @@ public struct GlassBackgroundModifier: ViewModifier {
8992
lineWidth: strokeWidth
9093
)
9194
)
92-
// Adds shadow for depth and elevation
95+
// Adds shadow for depth and elevation
9396
.shadow(color: shadowColor.opacity(shadowOpacity), radius: shadowRadius, x: shadowX, y: shadowY)
9497
}
9598
}

0 commit comments

Comments
 (0)