Skip to content

Commit ba63e93

Browse files
committed
Fix minor bugs
1 parent 0912cc5 commit ba63e93

File tree

4 files changed

+8
-26
lines changed

4 files changed

+8
-26
lines changed

Demo/Demo/Samples/Advanced/GlassFlower/GlassFlower.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ struct GlassFlower: View {
4343
endPoint: .top
4444
)
4545
)
46-
.conditionalGlass()
46+
47+
// Apply glass effect from SwiftGlass library to create translucent look
48+
.glass(color: colors[index % colors.count])
49+
4750
.frame(width: 55, height: 100) // Petal dimensions
4851
.offset(x: 0, y: 0) // Position petals away from center
4952
.rotationEffect(.degrees(Double(index) * 45), anchor: .bottom) // Distribute evenly in 360° (8×45°)

Demo/Demo/Samples/Advanced/GlassFlower/GlassFlowerRotate.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct GlassFlowerRotate: View {
4747
)
4848

4949
// Apply glass effect from SwiftGlass library to create translucent look
50-
.conditionalGlass()
50+
.glass(color: colors[index % colors.count])
5151

5252
.frame(width: 55, height: 100) // Petal dimensions
5353
.offset(x: 0, y: 0) // Position petals away from center
@@ -75,6 +75,7 @@ struct GlassFlowerRotate: View {
7575
}
7676
}) {
7777
Text(rotateToCenter ? "Reset Rotation" : "Rotate to Center")
78+
.foregroundColor(.primary)
7879
.padding(15)
7980
}
8081
.cornerRadius(8)

Sources/SwiftGlass/ConditionGlass.swift

Lines changed: 0 additions & 22 deletions
This file was deleted.

Sources/SwiftGlass/GlassBackgroundModifier.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ 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-
.background(material)
76-
.glassEffect(in: .rect(cornerRadius: radius))
75+
// .background(material)
76+
.glassEffect(.regular.tint(color).interactive(), in: .rect(cornerRadius: radius))
7777
.cornerRadius(radius)
7878
.shadow(color: shadowColor.opacity(shadowOpacity), radius: shadowRadius, x: shadowX, y: shadowY)
7979
} else {

0 commit comments

Comments
 (0)