From d56cdd2b627d43c3c60a137c6f910a69e514711d Mon Sep 17 00:00:00 2001 From: Levente Anda <85457088+scaredcr6w@users.noreply.github.com> Date: Wed, 21 Aug 2024 14:17:21 +0200 Subject: [PATCH 1/3] scrolling disabled in the settings sidebar --- CodeEdit/Features/Settings/SettingsView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/CodeEdit/Features/Settings/SettingsView.swift b/CodeEdit/Features/Settings/SettingsView.swift index 58c7c15eda..4207597b5b 100644 --- a/CodeEdit/Features/Settings/SettingsView.swift +++ b/CodeEdit/Features/Settings/SettingsView.swift @@ -152,6 +152,7 @@ struct SettingsView: View { } } .searchable(text: $searchText, placement: .sidebar, prompt: "Search") + .scrollDisabled(true) .navigationSplitViewColumnWidth(215) } detail: { Group { From 8d0e76941c0fd19b7b8357ee44d1d3718e71729a Mon Sep 17 00:00:00 2001 From: Levente Anda <85457088+scaredcr6w@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:29:29 +0200 Subject: [PATCH 2/3] the searchbar is now pinned to the top of the sidebar --- CodeEdit/Features/Settings/SettingsView.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CodeEdit/Features/Settings/SettingsView.swift b/CodeEdit/Features/Settings/SettingsView.swift index 4207597b5b..6a0857b28f 100644 --- a/CodeEdit/Features/Settings/SettingsView.swift +++ b/CodeEdit/Features/Settings/SettingsView.swift @@ -144,6 +144,10 @@ struct SettingsView: View { var body: some View { NavigationSplitView { + List { } + .searchable(text: $searchText, placement: .sidebar, prompt: "Search") + .scrollDisabled(true) + .frame(maxHeight: 30) List(selection: $selectedPage) { Section { ForEach(Self.pages) { pageAndSettings in @@ -151,8 +155,6 @@ struct SettingsView: View { } } } - .searchable(text: $searchText, placement: .sidebar, prompt: "Search") - .scrollDisabled(true) .navigationSplitViewColumnWidth(215) } detail: { Group { From 27098a3c6d5610023009f4bd8afbb66c988ba426 Mon Sep 17 00:00:00 2001 From: Levente Anda <85457088+scaredcr6w@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:48:00 +0200 Subject: [PATCH 3/3] using height instead of maxHeight --- CodeEdit/Features/Settings/SettingsView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeEdit/Features/Settings/SettingsView.swift b/CodeEdit/Features/Settings/SettingsView.swift index 6a0857b28f..d7e7ef766e 100644 --- a/CodeEdit/Features/Settings/SettingsView.swift +++ b/CodeEdit/Features/Settings/SettingsView.swift @@ -147,7 +147,7 @@ struct SettingsView: View { List { } .searchable(text: $searchText, placement: .sidebar, prompt: "Search") .scrollDisabled(true) - .frame(maxHeight: 30) + .frame(height: 30) List(selection: $selectedPage) { Section { ForEach(Self.pages) { pageAndSettings in