@@ -144,18 +144,32 @@ struct SettingsView: View {
144144
145145 var body : some View {
146146 NavigationSplitView {
147- List { }
148- . searchable ( text: $searchText, placement: . sidebar, prompt: " Search " )
149- . scrollDisabled ( true )
150- . frame ( height: 30 )
151- List ( selection: $selectedPage) {
152- Section {
153- ForEach ( Self . pages) { pageAndSettings in
154- results ( pageAndSettings. page, pageAndSettings. settings)
147+ /// Remove the extra List workaround; macOS 26's sidebar .searchable now matches System Settings
148+ if #unavailable( macOS 26 . 0 ) {
149+ List { }
150+ . searchable ( text: $searchText, placement: . sidebar, prompt: " Search " )
151+ . scrollDisabled ( true )
152+ . frame ( height: 30 )
153+ List ( selection: $selectedPage) {
154+ Section {
155+ ForEach ( Self . pages) { pageAndSettings in
156+ results ( pageAndSettings. page, pageAndSettings. settings)
157+ }
158+ }
159+ }
160+ . navigationSplitViewColumnWidth ( 215 )
161+ } else {
162+ List ( selection: $selectedPage) {
163+ Section {
164+ ForEach ( Self . pages) { pageAndSettings in
165+ results ( pageAndSettings. page, pageAndSettings. settings)
166+ }
155167 }
156168 }
169+ . toolbar ( removing: . sidebarToggle)
170+ . searchable ( text: $searchText, placement: . sidebar, prompt: " Search " )
171+ . navigationSplitViewColumnWidth ( 215 )
157172 }
158- . navigationSplitViewColumnWidth ( 215 )
159173 } detail: {
160174 Group {
161175 switch selectedPage. name {
@@ -191,13 +205,16 @@ struct SettingsView: View {
191205 . hideSidebarToggle ( )
192206 . navigationTitle ( selectedPage. name. rawValue)
193207 . toolbar {
194- ToolbarItem ( placement: . navigation) {
195- if !model. backButtonVisible {
196- Rectangle ( )
197- . frame ( width: 10 )
198- . opacity ( 0 )
199- } else {
200- EmptyView ( )
208+ /// macOS 26 automatically adjusts the leading padding for navigationTitle
209+ if #unavailable( macOS 26 . 0 ) {
210+ ToolbarItem ( placement: . navigation) {
211+ if !model. backButtonVisible {
212+ Rectangle ( )
213+ . frame ( width: 10 )
214+ . opacity ( 0 )
215+ } else {
216+ EmptyView ( )
217+ }
201218 }
202219 }
203220 }
0 commit comments