-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
Just checked it out and it's working great! Thanks. |
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. |
It seems good now! |
include/AutomationEditor.h
Outdated
@@ -241,6 +241,8 @@ protected slots: | |||
QScrollBar * m_leftRightScroll; | |||
QScrollBar * m_topBottomScroll; | |||
|
|||
void incrementLeftRightScoll(int value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just noticed that something like update
or adjust
would have been better than increment
. The reason is that it does not always increment but can also decrement depending on the sign of value
.
However, I don't want to be too picky. 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem!
Add proportional scrolling to the song editor, piano roll and automation editor. Proportional scrolling means that if for example a certain measure is on the right side of the song editor then it will take a certain number of mouse wheel moves to get it to the left side of the editor. It is the same number of wheel moves regardless of the zoom level.
Fixes #7474 by making the scroll amount change based on the zoom amount.
The implementation is slightly different in the
SongEditor
versus thePianoRoll
and theAutomationEditor
, since theSongEditor
has precise zoom control while the others have zoom levels. I opted to usepixelsPerBar()
in theSongEditor
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.