glass effect compat

This commit is contained in:
neon443
2025-09-24 12:29:21 +01:00
parent 37e2165725
commit 5132b4f69c
3 changed files with 14 additions and 3 deletions

View File

@@ -23,7 +23,8 @@ struct HostSymbolPicker: View {
var body: some View {
ZStack {
Rectangle()
.foregroundStyle(cScheme == .dark ? .black : .gray)
.modifier(glassEffectCompat())
// .foregroundStyle(cScheme == .dark ? .black : .gray)
VStack(alignment: .center, spacing: 0) {
ScrollView(.horizontal) {
HStack {

View File

@@ -8,6 +8,16 @@
import Foundation
import SwiftUI
struct glassEffectCompat: ViewModifier {
func body(content: Content) -> some View {
if #available(iOS 19, *) {
content.glassEffect()
} else {
content
}
}
}
struct glassButton: ViewModifier {
var prominent: Bool