Lists can change tints
This commit is contained in:
parent
828afc056b
commit
2d040a6313
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue