mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
add some glass effect... why not?
This commit is contained in:
parent
f9262d9a05
commit
789eedcdb7
1 changed files with 21 additions and 10 deletions
|
|
@ -71,6 +71,7 @@ struct XcodeListView: View {
|
||||||
PlatformsPocket()
|
PlatformsPocket()
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
.padding(.vertical, 8)
|
.padding(.vertical, 8)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -83,20 +84,30 @@ struct PlatformsPocket: View {
|
||||||
openWindow(id: "platforms")
|
openWindow(id: "platforms")
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
HStack(spacing: 5) {
|
if #available(macOS 26.0, *) {
|
||||||
Image(systemName: "square.3.layers.3d")
|
platformsLabel
|
||||||
.font(.title3.weight(.medium))
|
.glassEffect(in: .rect(cornerRadius: 8, style: .continuous))
|
||||||
Text("PlatformsDescription")
|
} else {
|
||||||
Spacer()
|
platformsLabel
|
||||||
|
.background(.quaternary.opacity(0.75))
|
||||||
|
.clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
|
||||||
}
|
}
|
||||||
.font(.body.weight(.medium))
|
|
||||||
.padding(.horizontal)
|
|
||||||
.padding(.vertical, 12)
|
|
||||||
.background(.quaternary.opacity(0.75))
|
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
|
|
||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var platformsLabel: some View {
|
||||||
|
HStack(spacing: 5) {
|
||||||
|
Image(systemName: "square.3.layers.3d")
|
||||||
|
.font(.title3.weight(.medium))
|
||||||
|
Text("PlatformsDescription")
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
.font(.body.weight(.medium))
|
||||||
|
.padding(.horizontal)
|
||||||
|
.padding(.vertical, 12)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct XcodeListView_Previews: PreviewProvider {
|
struct XcodeListView_Previews: PreviewProvider {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue