Show left-column icon and title for Home and Sidebar settings on tvOS

This commit is contained in:
Arkadiusz Fal
2026-04-16 19:18:49 +02:00
parent e2f3107833
commit 71dd956f18
3 changed files with 21 additions and 1 deletions

View File

@@ -43,7 +43,9 @@ struct HomeSettingsView: View {
#if os(iOS)
.environment(\.editMode, isEditMode ? .constant(.active) : .constant(.inactive))
#endif
#if !os(tvOS)
.navigationTitle(String(localized: "home.settings.title"))
#endif
#if os(iOS)
.navigationBarTitleDisplayMode(.inline)
#endif

View File

@@ -79,7 +79,14 @@ private struct CustomizationSection: View {
var body: some View {
Section {
NavigationLink {
#if os(tvOS)
TVSidebarDetailContainer(
systemImage: SidebarItem.home.systemImage,
title: String(localized: "settings.appearance.home.customize")
) { HomeSettingsView() }
#else
HomeSettingsView()
#endif
} label: {
Label(String(localized: "settings.appearance.home.customize"), systemImage: SidebarItem.home.systemImage)
}
@@ -101,12 +108,21 @@ private struct CustomizationSection: View {
}
#endif
#if os(macOS) || os(tvOS)
#if os(macOS)
NavigationLink {
SidebarSettingsView()
} label: {
Label(String(localized: "settings.sidebar.title"), systemImage: "sidebar.leading")
}
#elseif os(tvOS)
NavigationLink {
TVSidebarDetailContainer(
systemImage: "sidebar.leading",
title: String(localized: "settings.sidebar.title")
) { SidebarSettingsView() }
} label: {
Label(String(localized: "settings.sidebar.title"), systemImage: "sidebar.leading")
}
#endif
}
}

View File

@@ -136,7 +136,9 @@ struct SidebarSettingsView: View {
#if os(iOS)
.environment(\.editMode, .constant(.active))
#endif
#if !os(tvOS)
.navigationTitle(String(localized: "settings.sidebar.title"))
#endif
#if os(iOS)
.navigationBarTitleDisplayMode(.inline)
#endif