Improving the Timeline
Back in GSoC 2017, I created the timeline in musescore: https://musescore.org/en/handbook/3/timeline . While it functionally works, there are multiple issues with it--visual, functional, and maintainable. Keep in mind that this is a work in progress, any pictures of the new timeline are subject to change.
When I was creating the timeline, I developed it on windows, making it look nice on that platform. I had some limited linux testing as my mentor used linux. However, with the introduction of changing font sizes and styles, my timeline wouldn't update to them. Also, the initial display was variable from screen to screen, OS to OS.
Here is an example of the original timeline on a different computer:
Clearly, there are large gaps around the text and some text is way smaller than the desired font size. To compare, here is the same score using the new timeline (yes, I see the label bug):
Now, everything is tight around the text, removing a bunch of useless space.
Another issue that this will fix is the new "Dark Theme". More info on that can be found here: https://musescore.org/en/node/276002
Finally, the original timeline uses bitmap images to draw the arrows and eyes on the labels. This looks jagged and not smooth. I will replace these with proper images that will be smooth.
The main issue here is speed. The old timeline had issues with lag when handling large scores. The main issue is that it refreshed the entire timeline with every score interaction, even just dragging the score. Now, it only updates the respective parts of the timeline when the user edits the score, drags the score, and changes the selection. Also, there was some lag when dragging the timeline on a large score which has also been fixed. Lastly, zooming in and out caused incredible amounts of lag on a large score. The new timeline will avoid this by adjusting the current timeline, not refreshing the entire timeline.
Another issue is translations. The original timeline responds quite poorly to changing the current language. The new timeline aims to fix any language issues.
Other functional fixes are mentioned here: https://github.com/musescore/MuseScore/pull/4542
This is the main reason for refactoring the timeline. The original code is a big mess. Many constants are used for color, font size, images, etc. instead of dependent variables. The flow of code is confusing with complex data structures where they are not needed and setting item data when a class or struct is better. Some functions are multiple 100s of lines of code and do five different things all at once. To combat this, I have split the timeline into multiple classes, each handling their own part of the timeline and talking with one another. I have not had much developer feedback on the new code, but I still think this is a vast improvement from the original. To see my changes, take a look at my current pull request: https://github.com/musescore/MuseScore/pull/4542 .
This is a call for help. Most of the timeline is up for debate and anything can change. Here are a couple of questions:
1. How does the new timeline look so far? The colors will change once dark theme is implemented. The more input I get here, the more I can improve the timeline.
2. What do you wish the timeline did/looked like/didn't do? Should the timeline display a line as the score plays? etc.
3. What are some good colors for the timeline? What about dark theme?
For proper reference, here is the timeline:
Thank you for your input!