Skip to content

Commit

Permalink
Fixed macOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
orchetect committed Feb 1, 2024
1 parent 715eec0 commit 02f0208
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/Controls/Control.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public struct Control<Content: View>: View {
.onAppear {
rect = proxy.frame(in: .local)
}
.onChange(of: proxy.size) {
.onChange(of: proxy.size) { _ in
rect = proxy.frame(in: .local)
}
}
Expand Down
3 changes: 2 additions & 1 deletion Sources/Controls/Implementations/IndexedSlider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public struct IndexedSlider: View {
.offset(x: CGFloat(index) * geo.size.width / CGFloat(labels.count))
.animation(.easeOut, value: index)
}
}.onChange(of: normalValue) {
}
.onChange(of: normalValue) { _ in
index = Int(normalValue * 0.99 * Float(labels.count))
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Controls/TwoParameterControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public struct TwoParameterControl<Content: View>: View {
.onAppear {
rect = proxy.frame(in: .local)
}
.onChange(of: proxy.size) {
.onChange(of: proxy.size) { _ in
rect = proxy.frame(in: .local)
}
}
Expand Down

0 comments on commit 02f0208

Please # to comment.