fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design

Home Page:https://fyne.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Widget SliderWithData doesn't work with OnChangeEnded() functionality

williambrode opened this issue · comments

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

When using widgets.SliderWithData() and adding an OnChangeEnded function - the OnChangeEnded will be called for every movement of the slider instead of at the end of movement as was intended.

How to reproduce

Run the example code and slide the slider and notice it prints tons, instead of when you stop.

Screenshots

No response

Example code

b := binding.NewFloat()
slider := widget.NewSliderWithData(0, 100, b)
slider.OnChangeEnded = func(val float64) {
   log.Info("OnChangeEnded called")
}

Fyne version

v2.4.3

Go compiler version

1.19

Operating system and version

Windows 10

Additional Information

No response

I cannot replicate on develop, can you let me know if you can? It may already have been fixed as a side effect of something else...