mirror of
https://github.com/yattee/yattee.git
synced 2026-05-13 10:55:03 +00:00
Tighten Sidebar settings for macOS
Drop the redundant inner NavigationStack on non-tvOS (the outer detail pane already provides one) and apply .listStyle(.inset) on macOS. Kept as List to preserve drag-to-reorder for the main navigation section.
This commit is contained in:
@@ -125,7 +125,16 @@ struct SidebarSettingsView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
#if os(tvOS)
|
||||||
NavigationStack {
|
NavigationStack {
|
||||||
|
sidebarList
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
sidebarList
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
private var sidebarList: some View {
|
||||||
List {
|
List {
|
||||||
startupSection
|
startupSection
|
||||||
mainNavigationSection
|
mainNavigationSection
|
||||||
@@ -136,6 +145,9 @@ struct SidebarSettingsView: View {
|
|||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.environment(\.editMode, .constant(.active))
|
.environment(\.editMode, .constant(.active))
|
||||||
#endif
|
#endif
|
||||||
|
#if os(macOS)
|
||||||
|
.listStyle(.inset)
|
||||||
|
#endif
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
.navigationTitle(String(localized: "settings.sidebar.title"))
|
.navigationTitle(String(localized: "settings.sidebar.title"))
|
||||||
#endif
|
#endif
|
||||||
@@ -146,10 +158,6 @@ struct SidebarSettingsView: View {
|
|||||||
loadMainNavigationSettings()
|
loadMainNavigationSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if os(macOS)
|
|
||||||
.frame(minWidth: 400, minHeight: 300)
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - Startup Section
|
// MARK: - Startup Section
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user