@@ -30,6 +30,9 @@ struct EditorAreaView: View {
3030 @Environment ( \. window. value)
3131 private var window : NSWindow ?
3232
33+ @Environment ( \. isEditorLayoutAtEdge)
34+ private var isAtEdge
35+
3336 init ( editor: Editor , focus: FocusState < Editor ? > . Binding ) {
3437 self . editor = editor
3538 self . _focus = focus
@@ -101,6 +104,10 @@ struct EditorAreaView: View {
101104 }
102105
103106 VStack ( spacing: 0 ) {
107+ if isAtEdge != . top, #available( macOS 26 , * ) {
108+ Spacer ( ) . frame ( height: 4 )
109+ }
110+
104111 if topSafeArea > 0 {
105112 Rectangle ( )
106113 . fill ( . clear)
@@ -111,7 +118,9 @@ struct EditorAreaView: View {
111118 EditorTabBarView ( hasTopInsets: topSafeArea > 0 , codeFile: fileBinding)
112119 . id ( " TabBarView " + editor. id. uuidString)
113120 . environmentObject ( editor)
114- Divider ( )
121+ if #unavailable( macOS 26 ) {
122+ Divider ( )
123+ }
115124 }
116125 if showEditorJumpBar {
117126 EditorJumpBarView (
@@ -125,13 +134,47 @@ struct EditorAreaView: View {
125134 }
126135 . environmentObject ( editor)
127136 . padding ( . top, shouldShowTabBar ? - 1 : 0 )
137+ if #unavailable( macOS 26 ) {
138+ Divider ( )
139+ }
140+ }
141+ // On Tahoe we only show one divider
142+ if #available( macOS 26 , * ) , shouldShowTabBar || showEditorJumpBar {
128143 Divider ( )
129144 }
130145 }
131146 . environment ( \. isActiveEditor, editor == editorManager. activeEditor)
132147 . if ( . tahoe) {
133148 // FB20047271: Glass toolbar effect ignores floating scroll view views.
134149 // https://openradar.appspot.com/radar?id=EhAKBVJhZGFyEICAgKbGmesJ
150+
151+ // FB20191516: Can't disable backgrounded liquid glass tint
152+ // https://openradar.appspot.com/radar?id=EhAKBVJhZGFyEICAgLqTk-4J
153+ // Tracking Issue: #2191
154+ // Add this to the top:
155+ // ```
156+ // @AppSettings(\.theme.useThemeBackground)
157+ // var useThemeBackground
158+ //
159+ // private var backgroundColor: NSColor {
160+ // let fallback = NSColor.textBackgroundColor
161+ // return if useThemeBackground {
162+ // ThemeModel.shared.selectedTheme?.editor.background.nsColor ?? fallback
163+ // } else {
164+ // fallback
165+ // }
166+ // }
167+ // ```
168+ // And use this:
169+ // ```
170+ // $0.background(
171+ // Rectangle().fill(.clear)
172+ // .glassEffect(.regular.tint(Color(backgroundColor))
173+ // .ignoresSafeArea(.all)
174+ // )
175+ // ```
176+ // When we can figure out how to disable the 'not focused' glass effect.
177+
135178 $0. background ( EffectView ( . headerView) . ignoresSafeArea ( . all) )
136179 } else: {
137180 $0. background ( EffectView ( . headerView) )
0 commit comments