Fix #9697: align opened scores in the middle instead of the top left #12513
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 :-)