-
Notifications
You must be signed in to change notification settings - Fork 3k
fix #8970: remove space between accidentals and arpeggios #9097
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
fix #8970: remove space between accidentals and arpeggios #9097
Conversation
Backport of musescore#9097 Can't (yet) attribute this to @Nick-Mazuk
Backport of musescore#9097, fixes musescore#8970 Can't (yet) attribute this to @Nick-Mazuk
Backport of musescore#9097, fixes musescore#8970 Can't (yet) attribute this to @Nick-Mazuk
|
I could go either way. I tried both and went with 0.25 spaces because then the gap size is identical with and without accidentals. |
|
Fair enough. To me in the images from original issue's score the distance between barline and arpeggio is still too small with 0.25. But that's nothing this PR here touches on, not directly at least. And in your example that's not an issue either. |
Backport of musescore#9097, fixes musescore#8970 Can't (yet) attribute this to @Nick-Mazuk
|
Just added a commit that does a few things:
|
Backport of musescore#9097, fixes musescore#8970 Can't (yet) attribute this to @Nick-Mazuk
|
This is a complete rewrite of the feature, but I believe it's finalized.
For instance, take a look at this image. The sharp now fits inside of the bracket because there's space! All test cases: Here's the test file I used to validate the changes. |
Fixed |
|
Assuming this looks good with everyone, I'm done working on it and it can be merged. |
|
You may want to squash commits. Those last 3 commits should really be just one |
8ab3414 to
f7fb876
Compare
|
Fixed typo and squashed the commits |
f7fb876 to
eea541e
Compare
|
@Jojo-Schmitz, resolved your comments about the unreachable |
fix code style issues add semicolon to fix build error fix typo fix Jojo's comments fix code style
eea541e to
af58392
Compare
Backport of musescore#9097, fixes musescore#8970, all 4 parts
Backport of musescore#9097, fixes musescore#8970, all 4 parts
Backport of musescore#9097, fixes musescore#8970, all 4 parts
Backport of musescore#9097, fixes musescore#8970, all 4 parts
3b1f4d6 to
727ab0a
Compare
Backport of musescore#9097, fixes musescore#8970, all 5 parts
fix codestyle issues
685dd92 to
9920c15
Compare
Backport of musescore#9097, fixes musescore#8970, all 6 parts
|
These last few updates take care of every last edge case I can think of, including checking the output in multiple fonts. There are also a few minor tweaks as requested by Simon. There's also some code refactoring to make sure it's easier to read. Here's what the original test cases look like now: And with Petaluma, a font with completely different metrics: |
Backport of musescore#9097, fixes musescore#8970, all 7 parts
Backport of musescore#9097, fixes musescore#8970, all 7 parts
Backport of musescore#9097, fixes musescore#8970, all 7 parts
Backport of musescore#9097, fixes musescore#8970, all 7 parts
| #include "arpeggio.h" | ||
|
|
||
| #include <cmath> | ||
| #include <QVector> |
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.
At the moment we're trying to reduce dependencies from Qt in engraving module. Make sure that you're using STL containers here and in the further PRs
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.
Ok, will do. If I notice that there's an unneeded, existing Qt dependency, I assume I should convert it to a STL container?
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.
In my backport of this PR to 3.x that include was not needed (Neither was the cmath) and 3.x's all.h doesn't either.
You're actually using a QVector in chord.cpp too but not the include. And in arpeggio.cpp QVector was used even before your PR. So that include seems not needed at all.
|
Assigning to @vshalkevich |
Backport of musescore#9097, fixes musescore#8970, all 7 parts
|
Checked on Linux Ubunty, Windows 10, MacOS |
Backport of musescore#9097, fixes musescore#8970, all 7 parts
Backport of musescore#9097, fixes musescore#8970, all 7 parts
Backport of musescore#9097, fixes musescore#8970, all 7 parts
Backport of musescore#9097, fixes musescore#8970, all 7 parts




Resolves: #8970
Accidentals have a quarter space padding around them. This creates an unnecessarily large gap between accidentals and arpeggios. This PR decreases that gap by a quarter space, making the gap the same size as if the accidentals weren't there.
Before:
After:
Currently, the decrease of a quarter space is hardcoded in. Alternatively, we can use the same value that defines the spaces between accidentals. I have not yet found where this is defined, though.