@@ -151,6 +151,7 @@ public struct CompactSlider<Value: BinaryFloatingPoint, Point: CompactSliderPoin
151151
152152 @State var isHovering = false
153153 @State var isDragging = false
154+ @State var isWheelScrolling = false
154155 @State var startDragTime : CFAbsoluteTime ?
155156 @State var startDragLocation : CGPoint ?
156157 @State var scrollWheelEvent = ScrollWheelEvent . zero
@@ -180,24 +181,27 @@ public struct CompactSlider<Value: BinaryFloatingPoint, Point: CompactSliderPoin
180181 height: proxy. size. height - style. padding. vertical
181182 )
182183
183- style. makeBody (
184- configuration: CompactSliderStyleConfiguration (
184+ style. makeBody ( configuration : {
185+ let configuration = CompactSliderStyleConfiguration (
185186 type: style. type,
186187 size: size,
187- focusState: . init( isHovering: isHovering, isDragging: isDragging) ,
188+ focusState: . init(
189+ isHovering: isHovering,
190+ isDragging: isDragging,
191+ isWheelScrolling: isWheelScrolling
192+ ) ,
188193 progress: progress,
189194 step: step,
190195 colorScheme: colorScheme
191196 )
192- )
197+
198+ onChangeAction ? ( configuration)
199+ return configuration
200+ } ( ) )
193201 . dragGesture (
194202 options: options,
195- onChanged: {
196- dragGestureOnChange ( $0, size: size)
197- } ,
198- onEnded: {
199- dragGestureOnEnded ( $0, size: size)
200- }
203+ onChanged: { dragGestureOnChange ( $0, size: size) } ,
204+ onEnded: { dragGestureOnEnded ( $0, size: size) }
201205 )
202206 #if os(macOS)
203207 . onScrollWheel( isEnabled: options. contains ( . scrollWheel) ) {
0 commit comments