eclipse / nebula

Nebula Project
https://eclipse.org/nebula
Eclipse Public License 2.0
84 stars 97 forks source link

Add support for the default selection to the slider #576

Closed laeubi closed 3 months ago

laeubi commented 4 months ago

Currently the slider fires an update event on each change, but this can be not desired e.g because changing the value might be an expensive operation, or even the user chooses the same value in the end.

This now captures the current value on mouse down and if it has changed on mouseup fires a default selection event. This way a user of the slider can always decide what approach works best or even combine the different approaches. For example one can use the fast changing value to update ui-elements and the default selection to persist the value to disk/database/preferences/...

laeubi commented 3 months ago

@lcaron what do you think?

lcaron commented 3 months ago

Fine for me, thank you very much @laeubi