-
Notifications
You must be signed in to change notification settings - Fork 3k
fix #8975 - Change how barline distance is used in order to avoid collisions in double bar lines #9138
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 #8975 - Change how barline distance is used in order to avoid collisions in double bar lines #9138
Conversation
…llisions in double bar lines Backporf of musescore#9138
src/engraving/libmscore/barline.cpp
Outdated
| x += score()->styleP(Sid::repeatBarlineDotSeparation) * mag(); | ||
| x -= symBbox(SymId::repeatDot).width() * .5; | ||
| x += ((lw * .5) + score()->styleP(Sid::repeatBarlineDotSeparation)) * mag(); | ||
| //x -= symBbox(SymId::repeatDot).width() * .5; |
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.
Please, remove this line
src/engraving/libmscore/barline.cpp
Outdated
| x += score()->styleP(Sid::repeatBarlineDotSeparation) * mag(); | ||
| x -= symBbox(SymId::repeatDot).width() * .5; | ||
| x += ((lw * .5) + score()->styleP(Sid::repeatBarlineDotSeparation)) * mag(); | ||
| //x -= symBbox(SymId::repeatDot).width() * .5; |
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.
Please, remove this line
…llisions in double bar lines Backporf of musescore#9138
…llisions in double bar lines Backport of musescore#9138
|
Patch used (for 3.x): |
|
The bars are now too far apart because the 'distance' style parameters are now interpreted in a different way. I'm going to add a commit today that changes those default values to bring them closer to how it looks like in previous versions. Note that it's never going to be exactly the same because in previous versions the same value for distance could produce different effective distances due to the fact that line thickness ate into them |
distance style options now refer to the space between lines, not the distance between their centers.
|
That though would influence how these settings from scores imported from 3.x do get interpreted. So we'd need to adjust those on import. |
729b466 to
c8412b5
Compare
|
Removed unnecessary commented code and changed the defaults in styledef to account for distance interpretation. Assuming all stock default options, I subtracted the amount of space that was eaten up by line thickness (for example double bar distance I subtracted the default double bar thickness because half of one barline and half of the other used to be included in the distance value) |
|
As said: changing those defaults will fix the issue for new scores and for imported (pre 4.x) scores that never set those valued away from the default, but not for those that did change those values. So on import, these need to get adjusted. |
The process of converting old scores to new scores is going to be separate functionality--the current style defaults are the ones that apply to new scores in 4.0. How we deal with upconverting 3.x scores is going to be a different issue we'll see in the future, and those decisions can be made at that point I figure |
|
IMHO these need to be decided upon now, else it'd get forgotten. |
|
Well I'm in the process of writing up a big list of added and changed style parameters that can be maintained by whoever is changing or adding them, with old and new defaults, but in any case old score conversion is outside the scope of this particular issue. Conversion is going to be a big issue that tackles a lot of different aspects and I think it'd be better to have all of the work for that centralized in one location rather than changed piecemeal in dozens of other pull requests. Certainly the code that is changed in this pull request has absolutely nothing to do with score conversion, so for now let's keep this the way it is and I'll post the link to the wiki page I create today later. |
|
Well, as far as I'm aware these 3 values are the first and only changed defaults. But as long as it doesn't get forgotten... |
…llisions in double bar lines Backport of musescore#9138, part 1
As the 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue.
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
…llisions in double bar lines Backport of musescore#9138, part 1
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
|
Checked #8975 on Win10, Mac11.13.1, Linux Mint 20.2 - FIXED Please merge into master (@RomanPudashkin) |
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...
…llisions in double bar lines Backport of musescore#9138, part 1
The 2nd part of musescore#9138 can't really get ported, as it would create a compatibility issue. Values found by some educated guesses and some trial and error...


Resolves: #8975
Before, style options such as endBarDistance or doubleBarDistance described the distance between the mid points of the bar lines. This created an inconsistent distance when the line thicknesses were changed. Now, those distance style settings describe the distance between the right side of one bar and the left side of another.