-
-
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
Piano Roll scroll bar improvement #6818
base: master
Are you sure you want to change the base?
Conversation
src/gui/editors/PianoRoll.cpp
Outdated
m_leftRightScroll->setGeometry( | ||
m_whiteKeyWidth, | ||
height() - SCROLLBAR_SIZE, | ||
width() - m_whiteKeyWidth, |
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.
This suggestion is quite possibly out of scope here, but may also make things easier, so I'll mention it and see what you think. Currently the horizontal scroll bar extends to the very right of the piano roll, below the vertical scroll bar. This is unusual in my experience; what you tend to see is an empty square in the bottom right where each scrollbar stops at the edge of the other. If we followed this pattern (i.e. made the horizontal scrollbar narrower by SCROLLBAR_SIZE
), it would mean you wouldn't need to fiddle with the vertical scrollbar width in setScrollbarPos
, as well as being more consistent with other software.
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'll try to add that to this PR, since it looks like it shouldn't be too difficult. I can also adjust the Song Editor and Automation Editor scrollbars while I'm at it. The Automation Editor updates its horizontal scrollbar's range in the paint event just like Piano Roll did before I improved it, so I should probably apply the same improvement to that class too.
It works ok. |
Another thing that would help with large midi clips (and in general) is to have reference inside the PianoRoll to the Song TimeLine because now the reference is "local". I mean if the clip starts on, say, beat 34, in the pianoroll it starts with 1, and with large clips specially it's kind of difficult to keep track of where you really are. It would be helpful to have something like 1(34), 2(35), etc. I know it's not related strictly to this PR, but it would help editing large midi clips. |
@superpaik I implemented your suggestion for clips small enough to fit on the screen. To do it, I had to modify |
It works ok. Thanks. |
Maybe #5902 solve this problem. |
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.
Code LGTM and no issues found when testing! Tried several combinations of zoom levels in piano roll and song editor, as well as different scroll positions in song editor just to be sure.
…r-dev' into piano-roll-scrollbar-dev
This is a simple quality-of-life improvement for the Piano Roll.
When working with large midi clips in the Piano Roll, it can be tiring to switch between clips because the Piano Roll's horizontal scrollbar always snaps back to the beginning of the clip, forcing the user to scroll over to the position where they want to work every time.
With this PR, double clicking a midi clip in the Song Editor will open that clip in the Piano Roll not to the beginning of the clip but to wherever on the midi clip the user double clicked. Hopefully this is intuitive enough and can help make the main LMMS workflow just a little bit smoother for users.
Partially addresses #2093 by making it easier to navigate to the section of a clip you're interested in from the Song Editor.
Demonstration:
https://github.com/LMMS/lmms/assets/33463986/e95b8b5b-50ab-46e4-af80-4800d99e7665
I also did some minor refactoring.
Closes #7663