mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-08-19 11:40:56 +00:00
Dim cells on background (#612)
This commit is contained in:
parent
ecd001a082
commit
83ecc15332
@ -125,6 +125,7 @@ extension View {
|
|||||||
fileprivate struct BackgroundViewModifier: ViewModifier {
|
fileprivate struct BackgroundViewModifier: ViewModifier {
|
||||||
|
|
||||||
@Environment(\.colorScheme) private var colorScheme
|
@Environment(\.colorScheme) private var colorScheme
|
||||||
|
@Environment(\.appearsActive) private var appearsActive
|
||||||
|
|
||||||
let interactionState: InteractionState
|
let interactionState: InteractionState
|
||||||
|
|
||||||
@ -148,6 +149,7 @@ fileprivate struct BackgroundViewModifier: ViewModifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func backgroundColor(interactionState: InteractionState) -> Color {
|
func backgroundColor(interactionState: InteractionState) -> Color {
|
||||||
|
guard appearsActive else { return Color.clear }
|
||||||
switch interactionState {
|
switch interactionState {
|
||||||
case .normal:
|
case .normal:
|
||||||
return colorScheme == .dark ? Color(white: 0.2) : Color(white: 0.885)
|
return colorScheme == .dark ? Color(white: 0.2) : Color(white: 0.885)
|
||||||
|
Loading…
Reference in New Issue
Block a user