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

Add scrolling support to NumSlider #2070

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

Conversation

Ampflower
Copy link
Contributor

This PR aims to add scrolling support to NumSlider.

I am only opening this as a draft for now for some input as this isn't complete.

  • Supports Chromium, Firefox, Epiphany
    • Note, some specific hackery was added for Epiphany.
      Someone with a MacOS machine would need to validate the following for Safari:
      • Shift + scrolling up correctly follows normally scrolling up, and vice-versa.
    • Some hackery was added for Firefox to tell it apart from a touchpad, as its deltaY isn't consistent between scrolling up & down.
  • Has specific touchpad support
    • Has a way to adjust sensitivity
    • This includes detecting one to allow for fine adjustments with the scroll gesture.
  • Has a way to reverse scrolling direction
    • This is necessary for natural scrolling. Safari on MacOS has a way to detect this, however no other browser and OS combination can. The best option is to give a way to flip the direction for this.

It is self-resetting to allow a device switch without feeling horrendous, unless you happen to switch to a mouse without leaving the slider.

I shall note that it does make a change to the backing data structure to coerce to an integer via |0, which I realise may break the modeller (although surprisingly doesn't?) and plugins expecting to allow non-integer input.

This does also introduce a check for bare WebKit specifically for Epiphany, as it is just detected as bare Electron otherwise.

@Ampflower
Copy link
Contributor Author

Notable that scrolling fast does cause it to switch into thinking that you're using a touchpad; that is something to filter out.

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.

None yet

1 participant