@@ -579,19 +579,20 @@ void TupletLayout::layoutBracket(Tuplet* item, const ChordRest* cr1, const Chord
579
579
580
580
if (item->hasBracket ()) {
581
581
double slope = (item->p2 ().y () - item->p1 ().y ()) / (item->p2 ().x () - item->p1 ().x ());
582
+ const double numberGap = 0.35 * spatium;
582
583
583
584
if (item->isUp ()) {
584
585
if (item->number ()) {
585
586
// set width of bracket hole
586
- double x = xNumber - numberWidth * .5 - spatium * . 5 ;
587
+ double x = xNumber - numberWidth * .5 - numberGap ;
587
588
item->p1 ().rx () = std::min (item->p1 ().x (), x - 0.5 * l1); // ensure enough space for the number
588
589
double y = item->p1 ().y () + (x - item->p1 ().x ()) * slope;
589
590
item->bracketL [0 ] = PointF (item->p1 ().x (), item->p1 ().y ());
590
591
item->bracketL [1 ] = PointF (item->p1 ().x (), item->p1 ().y () - l1);
591
592
item->bracketL [2 ] = PointF (x, y - l1);
592
593
593
594
// set width of bracket hole
594
- x = xNumber + numberWidth * .5 + spatium * . 5 ;
595
+ x = xNumber + numberWidth * .5 + numberGap ;
595
596
item->p2 ().rx () = std::max (item->p2 ().x (), x + 0.5 * l1); // ensure enough space for the number
596
597
y = item->p1 ().y () + (x - item->p1 ().x ()) * slope;
597
598
item->bracketR [0 ] = PointF (x, y - l1);
@@ -606,15 +607,15 @@ void TupletLayout::layoutBracket(Tuplet* item, const ChordRest* cr1, const Chord
606
607
} else {
607
608
if (item->number ()) {
608
609
// set width of bracket hole
609
- double x = xNumber - numberWidth * .5 - spatium * . 5 ;
610
+ double x = xNumber - numberWidth * .5 - numberGap ;
610
611
item->p1 ().rx () = std::min (item->p1 ().x (), x - 0.5 * l1); // ensure enough space for the number
611
612
double y = item->p1 ().y () + (x - item->p1 ().x ()) * slope;
612
613
item->bracketL [0 ] = PointF (item->p1 ().x (), item->p1 ().y ());
613
614
item->bracketL [1 ] = PointF (item->p1 ().x (), item->p1 ().y () + l1);
614
615
item->bracketL [2 ] = PointF (x, y + l1);
615
616
616
617
// set width of bracket hole
617
- x = xNumber + numberWidth * .5 + spatium * . 5 ;
618
+ x = xNumber + numberWidth * .5 + numberGap ;
618
619
item->p2 ().rx () = std::max (item->p2 ().x (), x + 0.5 * l1);
619
620
y = item->p1 ().y () + (x - item->p1 ().x ()) * slope;
620
621
item->bracketR [0 ] = PointF (x, y + l1);
0 commit comments