macOS: use ConcentricRectangle on Tahoe

pull/9717/head
Lukas 2025-11-26 21:00:08 +01:00
parent cbcd52846c
commit dc08d057fe
No known key found for this signature in database
GPG Key ID: 845CB61BD38F4E49
1 changed files with 10 additions and 2 deletions

View File

@ -469,7 +469,7 @@ extension Ghostty {
}
.padding(8)
.background(.background)
.cornerRadius(8)
.clipShape(clipShape)
.shadow(radius: 4)
.onAppear {
isSearchFieldFocused = true
@ -509,6 +509,14 @@ extension Ghostty {
}
}
private var clipShape: some Shape {
if #available(iOS 26.0, macOS 26.0, *) {
return ConcentricRectangle(corners: .concentric(minimum: 8), isUniform: true)
} else {
return RoundedRectangle(cornerRadius: 8)
}
}
enum Corner {
case topLeft, topRight, bottomLeft, bottomRight