Dim cells on background (#612)

This commit is contained in:
Max Goedjen 2025-08-17 22:19:13 -05:00 committed by GitHub
parent ecd001a082
commit 83ecc15332
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -125,6 +125,7 @@ extension View {
fileprivate struct BackgroundViewModifier: ViewModifier {
@Environment(\.colorScheme) private var colorScheme
@Environment(\.appearsActive) private var appearsActive
let interactionState: InteractionState
@ -148,6 +149,7 @@ fileprivate struct BackgroundViewModifier: ViewModifier {
}
func backgroundColor(interactionState: InteractionState) -> Color {
guard appearsActive else { return Color.clear }
switch interactionState {
case .normal:
return colorScheme == .dark ? Color(white: 0.2) : Color(white: 0.885)