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
extension View {
func listThreaded() -> some View {
func listThreaded(tint: Color = Color(uiColor: UIColor.label)) -> some View {
self
.scrollContentBackground(.hidden)
.tint(Color.white)
.tint(tint)
.background(Color.appBackground)
.listStyle(.inset)
}

View File

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