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

Fix broken knob interaction on touchscreens #3512

Merged
merged 1 commit into from
Jan 8, 2021

Conversation

Swiftb0y
Copy link
Member

@Swiftb0y Swiftb0y commented Jan 3, 2021

@github-actions github-actions bot added the ui label Jan 3, 2021
@Holzhaus
Copy link
Member

Holzhaus commented Jan 8, 2021

@mixxxdj/developers Who has a touchscreen to test this?

@Swiftb0y
Copy link
Member Author

Swiftb0y commented Jan 8, 2021

To explain my changes a bit:
previously, the code always reset the cursor position to the center of the knob after measuring the distance travelled since the previous cursor move. This doesn't work well on touchscreens because resetting the cursor conflicts with the users touchinput. this conflict ended up in mixxx always measuring a distance change on every move which occurs much more frequently on touchscreens and obviously also when the user didn't move the cursor much.
This PR changes this behavior to always measure from the previous move-position and only resetting the cursor when the knob is released. This might be a problem on knobs located near screen corners, but from my testing on a 1080p screen (the current implementation translates the distance in pixels directly to value change for the control without scaling based off the screen size) this is not a problem in Deere or Tango.

@daschuer
Copy link
Member

daschuer commented Jan 8, 2021

Well done! I have tested it and it is a big improvement.

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@daschuer daschuer merged commit 5df7bc4 into mixxxdj:2.3 Jan 8, 2021
Swiftb0y added a commit to Swiftb0y/mixxx that referenced this pull request Jan 12, 2021
@Be-ing
Copy link
Contributor

Be-ing commented Jan 13, 2021

I finally gave this a try. Thank you, this works quite well.

@Swiftb0y Swiftb0y deleted the fix_knob_touchscreen_interaction branch January 13, 2021 08:25
Holzhaus added a commit that referenced this pull request Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants