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

Adding proportional scrolling #7476

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

regulus79
Copy link
Contributor

Fixes #7474 by making the scroll amount change based on the zoom amount.

The implementation is slightly different in the SongEditor versus the PianoRoll and the AutomationEditor, since the SongEditor has precise zoom control while the others have zoom levels. I opted to use pixelsPerBar() in the SongEditor to calculate the zoom level for simplicity, since the zooming model is in log scale.

I actually had this on feature my mind awhile ago when I was implementing continuous autoscrolling, but I decided to leave it to a different pr and forgot about it. Now I've been reminded, so here it is.

Also, please let me know if the scrolling speed is too fast/too slow. Currently the scrolling speed is equal to the old scrolling speed at default zoom.

@yohannd1
Copy link

Just checked it out and it's working great! Thanks.
I do think the scrolling speed is too slow - I think it should be around the same amount as the vertical scrolling, but I'm not fully sure about that. Maybe the best would be to implement an option to adjust that? Not sure how complicated that would be.

@regulus79
Copy link
Contributor Author

Alright, I sped up the horizontal scrolling in the Piano Roll and Automation Editor by about 3x, so now the Piano Roll's horizontal scrolling is closer to the speed of the vertical scrolling. I didn't do exactly 3x, since that made it scroll exactly 1 beat, which made the grid pattern line up and look odd like it wasn't scrolling.

@yohannd1
Copy link

It seems good now!

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.

Proportional horizontal scroll
2 participants