add some glass effect... why not?

This commit is contained in:
Matt Kiazyk 2025-09-19 19:19:58 -05:00
parent f9262d9a05
commit 789eedcdb7

View file

@ -71,6 +71,7 @@ struct XcodeListView: View {
PlatformsPocket() PlatformsPocket()
.padding(.horizontal) .padding(.horizontal)
.padding(.vertical, 8) .padding(.vertical, 8)
} }
} }
} }
@ -83,6 +84,20 @@ struct PlatformsPocket: View {
openWindow(id: "platforms") openWindow(id: "platforms")
} }
) { ) {
if #available(macOS 26.0, *) {
platformsLabel
.glassEffect(in: .rect(cornerRadius: 8, style: .continuous))
} else {
platformsLabel
.background(.quaternary.opacity(0.75))
.clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
}
}
.buttonStyle(.plain)
}
var platformsLabel: some View {
HStack(spacing: 5) { HStack(spacing: 5) {
Image(systemName: "square.3.layers.3d") Image(systemName: "square.3.layers.3d")
.font(.title3.weight(.medium)) .font(.title3.weight(.medium))
@ -92,10 +107,6 @@ struct PlatformsPocket: View {
.font(.body.weight(.medium)) .font(.body.weight(.medium))
.padding(.horizontal) .padding(.horizontal)
.padding(.vertical, 12) .padding(.vertical, 12)
.background(.quaternary.opacity(0.75))
.clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
}
.buttonStyle(.plain)
} }
} }