diff options
| author | Christian Cleberg <[email protected]> | 2026-04-13 19:06:54 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-13 19:06:54 -0500 |
| commit | a6ad2b9815d72575206bdca860eef9db850cdf1c (patch) | |
| tree | b4d5f27aa1655e5e40bab178550d6e2576d7df8b /Hutch/Views/Settings/SettingsView.swift | |
| parent | 02a44d115b3784231cad640e992d9c18a7f67b40 (diff) | |
| download | hutch-a6ad2b9815d72575206bdca860eef9db850cdf1c.tar.gz hutch-a6ad2b9815d72575206bdca860eef9db850cdf1c.tar.bz2 hutch-a6ad2b9815d72575206bdca860eef9db850cdf1c.zip | |
feat(theme): AMOLED true-black rows via themedRow()
Apply listRowBackground(Color.black) per row in AMOLED mode using ThemedRowStyle
and themedRow() across Lists and Forms. Use themedList() for scroll/grouped
backgrounds. Treat segmented and clear list rows with isAMOLED-aware
listRowBackground where Color.clear was required. Removes reliance on UIKit
appearance for list cells on iOS 16+.
Implements: https://todo.sr.ht/~ccleberg/hutch/24
Diffstat (limited to 'Hutch/Views/Settings/SettingsView.swift')
| -rw-r--r-- | Hutch/Views/Settings/SettingsView.swift | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Hutch/Views/Settings/SettingsView.swift b/Hutch/Views/Settings/SettingsView.swift index 44b3ba5..4ed9216 100644 --- a/Hutch/Views/Settings/SettingsView.swift +++ b/Hutch/Views/Settings/SettingsView.swift @@ -60,11 +60,13 @@ struct SettingsView: View { Text(theme.label).tag(theme) } } + .themedRow() Picker("Density", selection: $displayDensity) { ForEach(DisplayDensity.allCases) { density in Text(density.label).tag(density) } } + .themedRow() } header: { Text("Appearance") } footer: { @@ -76,10 +78,12 @@ struct SettingsView: View { private func behaviorSection() -> some View { Section { Toggle("Swipe actions", isOn: $swipeActionsEnabled) + .themedRow() Toggle("Contribution graphs", isOn: $contributionGraphsEnabled) .onChange(of: contributionGraphsEnabled) { _, newValue in ContributionWidgetContextStore.setEnabled(newValue) } + .themedRow() } header: { Text("Behavior") } footer: { @@ -101,12 +105,14 @@ struct SettingsView: View { } } .alignmentGuide(.listRowSeparatorLeading) { _ in 0 } + .themedRow() Button { showAccountSwitcher = true } label: { Label("Manage Accounts", systemImage: "person.2") } + .themedRow() HStack { Image(systemName: "lock.shield") @@ -116,14 +122,17 @@ struct SettingsView: View { .foregroundStyle(.secondary) } .alignmentGuide(.listRowSeparatorLeading) { _ in 0 } + .themedRow() Button("Reset App Data", role: .destructive) { pendingDestructiveAction = .resetAppData } + .themedRow() Button("Sign Out", role: .destructive) { pendingDestructiveAction = .signOut } + .themedRow() } header: { Text("Authentication") } footer: { @@ -139,6 +148,7 @@ struct SettingsView: View { } label: { SwiftUI.Label("About Hutch", systemImage: "info.circle") } + .themedRow() } } } @@ -211,15 +221,18 @@ private struct AboutView: View { .foregroundStyle(.secondary) } .padding(.vertical, 4) + .themedRow() LabeledContent("Version", value: version) .onTapGesture { developerRevealCount = min(developerRevealCount + 1, 5) } + .themedRow() LabeledContent("Build", value: build) .onTapGesture { developerRevealCount = min(developerRevealCount + 1, 5) } + .themedRow() } footer: { Text(developerRevealFooterText) } @@ -228,34 +241,41 @@ private struct AboutView: View { Link(destination: URL(string: "https://sr.ht")!) { SwiftUI.Label("SourceHut", systemImage: "link") } + .themedRow() Link(destination: URL(string: "https://man.sr.ht")!) { SwiftUI.Label("SourceHut Manuals", systemImage: "book") } + .themedRow() Link(destination: URL(string: "https://sr.ht/~ccleberg/Hutch")!) { SwiftUI.Label("Project Repository", systemImage: "folder") } + .themedRow() } Section("Support") { Link(destination: URL(string: "mailto:[email protected]")!) { SwiftUI.Label("Email Support", systemImage: "envelope") } + .themedRow() } Section("Privacy") { Text("Hutch uses your SourceHut personal access token to make requests on your behalf. The token is stored locally in the iOS keychain.") .font(.subheadline) .foregroundStyle(.secondary) + .themedRow() Link(destination: URL(string: "https://zerolabs.sh/hutch/privacy-policy/")!) { SwiftUI.Label("Privacy Policy", systemImage: "hand.raised") } + .themedRow() } Section("Acknowledgements") { Text("Built for SourceHut users who want quick access to repositories, builds, and tickets on iOS.") .font(.subheadline) .foregroundStyle(.secondary) + .themedRow() } if developerToolsVisible { @@ -264,18 +284,21 @@ private struct AboutView: View { get: { appState.isDebugModeEnabled }, set: { appState.isDebugModeEnabled = $0 } )) + .themedRow() NavigationLink { HomePrototypeView() } label: { SwiftUI.Label("Home Prototype", systemImage: "house") } + .themedRow() NavigationLink { WorkPrototypeView() } label: { SwiftUI.Label("Work Prototype", systemImage: "tray.full") } + .themedRow() } header: { Text("Developer") } footer: { |
