Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional functionality for sliders #900

Open
sourcebox opened this issue May 31, 2021 · 3 comments
Open

Additional functionality for sliders #900

sourcebox opened this issue May 31, 2021 · 3 comments
Labels
feature New feature or request good first issue Good for newcomers widget

Comments

@sourcebox
Copy link

I'm working on an application which mainly consists for sliders for parameter control. For better user experience, it would be nice to offer two features: reset to default and fine control.

On VST plugins this is normally done via double-clicks and/or modifier keys. E.g. double-clicking resets the slider to a default (mostly 0), alternatively Ctrl-/Cmd-Klick also does it. For fine control, often Shift-dragging is used. Fine control is useful in cases where the slider covers a large value range with only little screen space.

Is there a way to add such functionality with the existing code via traits or would that require an update to the widgets?

@13r0ck
Copy link
Member

13r0ck commented May 31, 2021

An event would have to be added to the widget. The text_input widget is a good one to see example of how to implement more complex event detection.

Without making a modification to iced, you MAY be able to get the same result by putting the slider inside a button and then watch for double clicks as a custom widget

1 similar comment
@13r0ck
Copy link
Member

13r0ck commented May 31, 2021

An event would have to be added to the widget. The text_input widget is a good one to see example of how to implement more complex event detection.

Without making a modification to iced, you MAY be able to get the same result by putting the slider inside a button and then watch for double clicks as a custom widget

@JL710
Copy link
Contributor

JL710 commented May 4, 2024

Is this issue just forgotten or is there something that was not added in #2100?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers widget
Projects
None yet
Development

No branches or pull requests

4 participants