-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Custom keysig - count symbols width #11581
Custom keysig - count symbols width #11581
Conversation
e4be0a7
to
ba51bc3
Compare
Could you please add some unit-tests (only for changes in the engraving module) that will test your fix? |
@RomanPudashkin sorry, I need some guidance here. Or @cbjeukendrup ? |
Sorry, I meant vtests. You already have an experience of adding new vtests :) Or you can modify some existing vtests and add your case to them |
ba51bc3
to
fc32858
Compare
Updated test file to show accidentals in default xposition ( vtest fail is IMHO good, see @oktophonie I think, now You can look at it. Thanks |
fc32858
to
0c922ec
Compare
How does one even create a custom key signature? I can do one via the palettes but then it has the spacing that I specify (according to where I drag the symbols to), not a 'default' spacing. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
custom-keysig-1.mscx
default positions by symbol width, not fixed xstep other minor tweaks - add more transposable symbols (sharp sharp, natural sharp, natural flat) - replaced QString by std::string on some places - replaced "score()->spatium() / mag()" by "spatium()" (which already has mag calculation included)
0c922ec
to
74015ff
Compare
I updated editor, so now accidentals takes default positions (unless Control ispressed). key-editor-snap.mp4 |
Custom Key Signature - default accidental positions by symbol width, not fixed xstep
Accidentals have various widths (natural is thin, triple flat is fat). If default xstep were fixed, unwanted gaps, or overlays are produced.
Test file - accidentals on default positions (
xAlt = 0
)before (xStep = 1.4 sp):
after (xstep depends od symbol width):
other minor tweaks:
Sharp Sharp
,Natural Sharp
,Natural Flat
)QString
bystd::string
on some placesscore()->spatium() / mag()
byspatium()
(which already has mag calculation included)