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

Fixed mouse not respecting slider's info.step. #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ActivexDiamond
Copy link

@ActivexDiamond ActivexDiamond commented Jul 7, 2020

Sliders don't respect their info.step when dragged by the mouse.
The first new line rounds value to the nearest step.
The second new line also rounds fraction to the nearest step which is used for drawing. Skipping this line means the slider follows the mouse while being dragged but snaps back on release (the value is still always snapped).

The +0.5 is used to round it to the nearest value, removing it will always round down.
value_changed is only updated if the value is actually changed; dragging the mouse less than info.step/2 will not cause an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant