MuseScore
MuseScore copied to clipboard
Fix #9697: align opened scores in the middle instead of the top left
Resolves: #9697
Hello,
I first tried to fix this issue by simply centering the view horizontally with a small margin from the top vertically, but I didn't find the result very helpful for long scores with more than one page or continuous views. I thus thought it made sense to make the choice of the default position depend on the view mode and the number of pages.
Here is what it looks like so far:
Page mode, 1 page
Center horizontally, and align top with a small margin.
Page mode, 2 pages or more
It aligns the score on the top left with a small margin.
I initially thought to center the first page, but I think the space is better used by showing more of the score.
Horizontal continuous mode
Center vertically, and align left with a small margin.
Vertical continuous mode
Same as 1 page. This is the fallback alignment.
Switching tabs
I also noticed that the score was being moved to the top left each time one of the "Score"/"Publish"/... tabs was changed.
With a simple fix, it can stay as it was in the previous tab (in the code, it feeled like an unwanted side effect). Though, we might want to reset the default position instead of keeping the previous one?
I included the fix, but idk if I should create a separate issue?
Let me know what you think :-)
Hello, I rebased the changes to the latest version of master, and it still works.
There is just a slight problem when:
- the score is loaded in page mode with several parts opened
- the main score is changed to continuous mode
- a part is opened: it will center horizontally as if it was in page mode, even though it is in continuous mode.
However, this is fixed with the changes from my other PR for independent view modes #12618. Together, the two PR work correctly for independent and centered views.