Skip to content

Commit fc4ab71

Browse files
committed
Use Glass in Navigator Background
1 parent d26af96 commit fc4ab71

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// GlassEffectView.swift
3+
// CodeEdit
4+
//
5+
// Created by Khan Winter on 9/2/25.
6+
//
7+
8+
9+
struct GlassEffectView: NSViewRepresentable {
10+
func makeNSView(context: Context) -> NSView {
11+
if #available(macOS 26, *) {
12+
let view = NSGlassEffectView()
13+
view.cornerRadius = 0
14+
view.tintColor = .clear
15+
return view
16+
} else {
17+
return NSView()
18+
}
19+
}
20+
21+
func updateNSView(_ nsView: NSView, context: Context) { }
22+
}

CodeEdit/Features/NavigatorArea/Views/NavigatorAreaView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,8 @@ struct NavigatorAreaView: View {
4343
.environmentObject(workspace)
4444
.accessibilityElement(children: .contain)
4545
.accessibilityLabel("navigator")
46+
.if(.tahoe) {
47+
$0.background(GlassEffectView().ignoresSafeArea(.all))
48+
}
4649
}
4750
}

0 commit comments

Comments
 (0)