slint icon indicating copy to clipboard operation
slint copied to clipboard

`Slider` needs start callback

Open Enyium opened this issue 1 year ago • 2 comments

In my app, I'm updating a preview whenever the built-in Slider widget's changed callback is called and stopping the preview when its released callback is called. However, it would be better (when using the mouse) if the preview was started as soon as the user pressed down on the slider, even if the value wasn't changed yet. So, some new callback that was called at this point in the process would be useful. Surely, it should also be called when using the keyboard.

Enyium avatar Aug 22 '24 07:08 Enyium

Button has a pressed (out) property Similarly, we could add a pressed property to the Slider. Would that help?

ogoffart avatar Aug 22 '24 14:08 ogoffart

The preview involves Rust code starting something that runs in another thread. On changed and released, I call a callback. I don't think an out-property would currently suffice, as long as change callbacks aren't available.

Enyium avatar Aug 22 '24 15:08 Enyium