Merge pull request #4125 from Jojo-Schmitz/style

Barline styles
This commit is contained in:
anatoly-os 2018-11-26 00:13:36 +02:00 committed by GitHub
commit df240a92af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 62 additions and 15 deletions

View file

@ -131,13 +131,13 @@ static const StyleType styleTypes[] {
{ Sid::systemFrameDistance, "systemFrameDistance", Spatium(7.0) },
{ Sid::frameSystemDistance, "frameSystemDistance", Spatium(7.0) },
{ Sid::minMeasureWidth, "minMeasureWidth", Spatium(5.0) },
{ Sid::barWidth, "barWidth", Spatium(0.16) }, // 0.1875
{ Sid::barWidth, "barWidth", Spatium(0.16) },
{ Sid::doubleBarWidth, "doubleBarWidth", Spatium(0.16) },
{ Sid::endBarWidth, "endBarWidth", Spatium(0.5) }, // 0.5
{ Sid::doubleBarDistance, "doubleBarDistance", Spatium(0.46) }, // 0.3
{ Sid::endBarDistance, "endBarDistance", Spatium(.40 + (.5) * .5) }, // 0.3
{ Sid::repeatBarlineDotSeparation, "repeatBarlineDotSeparation", Spatium(.40 + .16 * .5) },
{ Sid::endBarWidth, "endBarWidth", Spatium(0.5) },
{ Sid::doubleBarDistance, "doubleBarDistance", Spatium(.40 + .16) },
{ Sid::endBarDistance, "endBarDistance", Spatium(.40 + (.16 + .50) * .5) },
{ Sid::repeatBarlineDotSeparation, "repeatBarlineDotSeparation", Spatium(.40 + .46 * .5) },
{ Sid::repeatBarTips, "repeatBarTips", QVariant(false) },
{ Sid::startBarlineSingle, "startBarlineSingle", QVariant(false) },
{ Sid::startBarlineMultiple, "startBarlineMultiple", QVariant(true) },

View file

@ -1244,8 +1244,8 @@ void EditStyle::valueChanged(int i)
QVariant val = getValue(idx);
bool setValue = false;
if (idx == Sid::MusicalSymbolFont && optimizeStyleCheckbox->isChecked()) {
ScoreFont* scoreFont = ScoreFont::fontFactory(val.toString());
if (scoreFont) {
ScoreFont* scoreFont = ScoreFont::fontFactory(val.toString());
if (scoreFont) {
for (auto j : scoreFont->engravingDefaults()) {
#if 0 // debug
if (cs->styleV(j.first) != j.second) {
@ -1265,20 +1265,23 @@ void EditStyle::valueChanged(int i)
cs->undo(new ChangeStyleVal(cs, Sid::endBarDistance,
cs->styleV(Sid::endBarDistance).toDouble()
+ (cs->styleV(Sid::barWidth).toDouble() + cs->styleV(Sid::endBarWidth).toDouble()) * .5));
cs->undo(new ChangeStyleVal(cs, Sid::doubleBarDistance,
cs->styleV(Sid::doubleBarDistance).toDouble()
+ (cs->styleV(Sid::barWidth).toDouble() + cs->styleV(Sid::barWidth).toDouble()) * .5));
// guess the repeat dot width = spatium * .3
cs->undo(new ChangeStyleVal(cs, Sid::repeatBarlineDotSeparation,
cs->styleV(Sid::repeatBarlineDotSeparation).toDouble()
+ (cs->styleV(Sid::barWidth).toDouble() + .3) * .5));
if (scoreFont->textEnclosureThickness()) {
// TextStyle ts = cs->textStyle(TextStyleType::REHEARSAL_MARK);
// ts.setFrameWidth(Spatium(scoreFont->textEnclosureThickness()));
//TODO cs->undo(new ChangeTextStyle(cs, ts));
}
}
setValue = true;
}
// if (scoreFont->textEnclosureThickness()) {
// TextStyle ts = cs->textStyle(TextStyleType::REHEARSAL_MARK);
// ts.setFrameWidth(Spatium(scoreFont->textEnclosureThickness()));
//TODO cs->undo(new ChangeTextStyle(cs, ts));
// }
}
setValue = true;
}
cs->undo(new ChangeStyleVal(cs, idx, val));
cs->update();
if (setValue)

View file

@ -6,6 +6,8 @@
<Division>480</Division>
<Style>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -6,6 +6,8 @@
<Division>480</Division>
<Style>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -15,6 +15,8 @@
<pageOddTopMargin>0.393701</pageOddTopMargin>
<pageOddBottomMargin>0.787403</pageOddBottomMargin>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -6,6 +6,8 @@
<Division>480</Division>
<Style>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -15,6 +15,8 @@
<pageOddTopMargin>0.393701</pageOddTopMargin>
<pageOddBottomMargin>0.787403</pageOddBottomMargin>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -6,6 +6,8 @@
<Division>480</Division>
<Style>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -6,6 +6,8 @@
<Division>480</Division>
<Style>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -6,6 +6,8 @@
<Division>480</Division>
<Style>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -15,6 +15,8 @@
<pageOddTopMargin>0.393701</pageOddTopMargin>
<pageOddBottomMargin>0.787403</pageOddBottomMargin>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -15,6 +15,8 @@
<pageOddTopMargin>0.393701</pageOddTopMargin>
<pageOddBottomMargin>0.787403</pageOddBottomMargin>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -15,6 +15,8 @@
<pageOddTopMargin>0.393701</pageOddTopMargin>
<pageOddBottomMargin>0.787403</pageOddBottomMargin>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -6,6 +6,8 @@
<Division>480</Division>
<Style>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -6,6 +6,8 @@
<Division>480</Division>
<Style>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -6,6 +6,8 @@
<Division>480</Division>
<Style>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -23,6 +23,8 @@
<lyricsEvenFontFace>MuseJazz Text</lyricsEvenFontFace>
<lyricsEvenOffset x="0" y="6"/>
<repeatBarTips>1</repeatBarTips>
<doubleBarDistance>0.54</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<stemWidth>0.16</stemWidth>

View file

@ -6,6 +6,8 @@
<Division>480</Division>
<Style>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -15,6 +15,8 @@
<pageOddTopMargin>0.393701</pageOddTopMargin>
<pageOddBottomMargin>0.787403</pageOddBottomMargin>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -15,6 +15,8 @@
<pageOddTopMargin>0.393701</pageOddTopMargin>
<pageOddBottomMargin>0.787403</pageOddBottomMargin>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -15,6 +15,8 @@
<pageOddTopMargin>0.393701</pageOddTopMargin>
<pageOddBottomMargin>0.787403</pageOddBottomMargin>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -15,6 +15,8 @@
<pageOddTopMargin>0.393701</pageOddTopMargin>
<pageOddBottomMargin>0.787403</pageOddBottomMargin>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -15,6 +15,8 @@
<pageOddTopMargin>0.393701</pageOddTopMargin>
<pageOddBottomMargin>0.787403</pageOddBottomMargin>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>

View file

@ -15,6 +15,8 @@
<pageOddTopMargin>0.393701</pageOddTopMargin>
<pageOddBottomMargin>0.787403</pageOddBottomMargin>
<lyricsMinBottomDistance>4</lyricsMinBottomDistance>
<doubleBarDistance>0.46</doubleBarDistance>
<endBarDistance>0.65</endBarDistance>
<clefLeftMargin>0.64</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<barNoteDistance>1.2</barNoteDistance>