scroll bars need to be more sensible #50

buckle2000 opened this Issue May 2, 2016 · 2 comments


None yet

3 participants


When I scroll my mouse wheel 1 rev, the view move by 1 px.

hedgehog90 commented May 2, 2016 edited

When I target web, the MouseEvent y value is 100 or -100, when I target windows, it's -1 or 1 (up instead of down).
Also, for some reason the scroll pane considers the MouseEvent y value a percentage to move the scroll bar (0-100), instead of a value for how many pixels the list should move by.

underscorediscovery commented May 12, 2016 edited

I will try to make it more consistent but it's worth keeping in mind the value is just what is fed to the canvas, i.e it comes from luxe (which gets it from snow, which gets it from SDL or the browser).

In the mint use case, remember that the event values are passed into mint, so it's using whatever you tell it to use. If you want to scroll a specific number of units take the sign of the scroll and multiply it by the amount of units you want one scroll to be - and then give that to mint instead.

I want to make them consistent from snow level, but it requires making decisions for the application on the lower levels, and I'm not sure what I want to do there just yet. For now, the values are sent as is and the application should consider what the best approach might be for them.

@underscorediscovery underscorediscovery added a commit that closed this issue Sep 6, 2016
@underscorediscovery underscorediscovery Scroll; add units_to_scroll_h/v which is in canvas units, and determi…
…nes what exact amount to scroll when scrolling.

makes scrollbars consistent across platforms and makes the distance
configurable. fix #50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment