Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
dmrschmidt committed Oct 8, 2023
1 parent c4d9ab9 commit 78635ad
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct SwiftUIExampleView: View {
@StateObject private var audioRecorder: AudioRecorder = AudioRecorder()

@State private var configuration: Waveform.Configuration = Waveform.Configuration(
style: .striped(Waveform.Style.StripeConfig(color: Self.randomColor)),
style: .striped(Waveform.Style.StripeConfig(color: Self.randomColor, width: 3, lineCap: .round)),
verticalScalingFactor: 0.9
)

Expand Down Expand Up @@ -84,7 +84,7 @@ struct SwiftUIExampleView: View {

HStack {
Button {
configuration = configuration.with(style: .striped(Waveform.Style.StripeConfig(color: Self.randomColor)))
configuration = configuration.with(style: .striped(Waveform.Style.StripeConfig(color: Self.randomColor, width: 3, lineCap: .round)))
liveConfiguration = liveConfiguration.with(style: .striped(.init(color: Self.randomColor, width: 3, spacing: 3)))
} label: {
Label("color", systemImage: "dice")
Expand Down Expand Up @@ -121,7 +121,9 @@ struct SwiftUIExampleView: View {
) { shape in
// you may completely override the shape styling this way
shape
.stroke(LinearGradient(colors: [.red, Color(Self.randomColor)], startPoint: .zero, endPoint: .topTrailing), lineWidth: 3)
.stroke(
LinearGradient(colors: [.red, Color(Self.randomColor)], startPoint: .zero, endPoint: .topTrailing),
style: StrokeStyle(lineWidth: 3, lineCap: .round))
}

Divider()
Expand Down

0 comments on commit 78635ad

Please sign in to comment.