Lists can change tints

This commit is contained in:
Lumaa 2024-01-06 02:50:29 +01:00
parent 828afc056b
commit 2d040a6313
2 changed files with 4 additions and 3 deletions

View File

@ -3,10 +3,10 @@
import SwiftUI import SwiftUI
extension View { extension View {
func listThreaded() -> some View { func listThreaded(tint: Color = Color(uiColor: UIColor.label)) -> some View {
self self
.scrollContentBackground(.hidden) .scrollContentBackground(.hidden)
.tint(Color.white) .tint(tint)
.background(Color.appBackground) .background(Color.appBackground)
.listStyle(.inset) .listStyle(.inset)
} }

View File

@ -17,6 +17,7 @@ struct AboutView: View {
Toggle("setting.experimental.activate", isOn: $userPreferences.showExperimental) Toggle("setting.experimental.activate", isOn: $userPreferences.showExperimental)
.listRowThreaded() .listRowThreaded()
.tint(Color(uiColor: UIColor.label))
.onAppear { .onAppear {
do { do {
let oldPreferences = try UserPreferences.loadAsCurrent() ?? UserPreferences.defaultPreferences let oldPreferences = try UserPreferences.loadAsCurrent() ?? UserPreferences.defaultPreferences
@ -27,7 +28,7 @@ struct AboutView: View {
} }
} }
} }
.listThreaded() .listThreaded(tint: Color.blue)
.navigationTitle("about") .navigationTitle("about")
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
.onDisappear { .onDisappear {