mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 18:35:05 +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,32 +125,40 @@ struct SidebarSettingsView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
#if os(tvOS)
|
||||
NavigationStack {
|
||||
List {
|
||||
startupSection
|
||||
mainNavigationSection
|
||||
sourcesSection
|
||||
channelsSection
|
||||
playlistsSection
|
||||
}
|
||||
#if os(iOS)
|
||||
.environment(\.editMode, .constant(.active))
|
||||
#endif
|
||||
#if !os(tvOS)
|
||||
.navigationTitle(String(localized: "settings.sidebar.title"))
|
||||
#endif
|
||||
#if os(iOS)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
#endif
|
||||
.onAppear {
|
||||
loadMainNavigationSettings()
|
||||
}
|
||||
sidebarList
|
||||
}
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 400, minHeight: 300)
|
||||
#else
|
||||
sidebarList
|
||||
#endif
|
||||
}
|
||||
|
||||
private var sidebarList: some View {
|
||||
List {
|
||||
startupSection
|
||||
mainNavigationSection
|
||||
sourcesSection
|
||||
channelsSection
|
||||
playlistsSection
|
||||
}
|
||||
#if os(iOS)
|
||||
.environment(\.editMode, .constant(.active))
|
||||
#endif
|
||||
#if os(macOS)
|
||||
.listStyle(.inset)
|
||||
#endif
|
||||
#if !os(tvOS)
|
||||
.navigationTitle(String(localized: "settings.sidebar.title"))
|
||||
#endif
|
||||
#if os(iOS)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
#endif
|
||||
.onAppear {
|
||||
loadMainNavigationSettings()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Startup Section
|
||||
|
||||
private var startupSection: some View {
|
||||
|
||||
Reference in New Issue
Block a user