Skip to content

Commit 789eedc

Browse files
committed
add some glass effect... why not?
1 parent f9262d9 commit 789eedc

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

Xcodes/Frontend/XcodeList/XcodeListView.swift

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ struct XcodeListView: View {
7171
PlatformsPocket()
7272
.padding(.horizontal)
7373
.padding(.vertical, 8)
74+
7475
}
7576
}
7677
}
@@ -83,20 +84,30 @@ struct PlatformsPocket: View {
8384
openWindow(id: "platforms")
8485
}
8586
) {
86-
HStack(spacing: 5) {
87-
Image(systemName: "square.3.layers.3d")
88-
.font(.title3.weight(.medium))
89-
Text("PlatformsDescription")
90-
Spacer()
87+
if #available(macOS 26.0, *) {
88+
platformsLabel
89+
.glassEffect(in: .rect(cornerRadius: 8, style: .continuous))
90+
} else {
91+
platformsLabel
92+
.background(.quaternary.opacity(0.75))
93+
.clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
9194
}
92-
.font(.body.weight(.medium))
93-
.padding(.horizontal)
94-
.padding(.vertical, 12)
95-
.background(.quaternary.opacity(0.75))
96-
.clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
95+
9796
}
9897
.buttonStyle(.plain)
9998
}
99+
100+
var platformsLabel: some View {
101+
HStack(spacing: 5) {
102+
Image(systemName: "square.3.layers.3d")
103+
.font(.title3.weight(.medium))
104+
Text("PlatformsDescription")
105+
Spacer()
106+
}
107+
.font(.body.weight(.medium))
108+
.padding(.horizontal)
109+
.padding(.vertical, 12)
110+
}
100111
}
101112

102113
struct XcodeListView_Previews: PreviewProvider {

0 commit comments

Comments
 (0)