Fix gradient

This commit is contained in:
Arkadiusz Fal
2022-12-20 23:21:12 +01:00
parent 41ac15b204
commit ce9c3fbd74
4 changed files with 52 additions and 22 deletions

View File

@@ -250,14 +250,6 @@ struct PlayerControls: View {
} else if player.videoForDisplay == nil {
Color.black
}
if model.presentingControls {
Rectangle()
.fill(
LinearGradient(stops: gradientStops, startPoint: .top, endPoint: .bottom)
)
.transition(.opacity)
}
}
}
@@ -271,15 +263,6 @@ struct PlayerControls: View {
return nil
}
var gradientStops: [Gradient.Stop] {
[
Gradient.Stop(color: .black.opacity(0.3), location: 0.0),
Gradient.Stop(color: .clear, location: 0.33),
Gradient.Stop(color: .clear, location: 0.66),
Gradient.Stop(color: .black.opacity(0.3), location: 1)
]
}
var timeline: some View {
TimelineView(context: .player).foregroundColor(.primary)
}