Skip to content

Commit 0d0cb0a

Browse files
committed
Decrease number padding
1 parent 0330b6d commit 0d0cb0a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/engraving/rendering/score/tupletlayout.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -579,19 +579,20 @@ void TupletLayout::layoutBracket(Tuplet* item, const ChordRest* cr1, const Chord
579579

580580
if (item->hasBracket()) {
581581
double slope = (item->p2().y() - item->p1().y()) / (item->p2().x() - item->p1().x());
582+
const double numberGap = 0.35 * spatium;
582583

583584
if (item->isUp()) {
584585
if (item->number()) {
585586
//set width of bracket hole
586-
double x = xNumber - numberWidth * .5 - spatium * .5;
587+
double x = xNumber - numberWidth * .5 - numberGap;
587588
item->p1().rx() = std::min(item->p1().x(), x - 0.5 * l1); // ensure enough space for the number
588589
double y = item->p1().y() + (x - item->p1().x()) * slope;
589590
item->bracketL[0] = PointF(item->p1().x(), item->p1().y());
590591
item->bracketL[1] = PointF(item->p1().x(), item->p1().y() - l1);
591592
item->bracketL[2] = PointF(x, y - l1);
592593

593594
//set width of bracket hole
594-
x = xNumber + numberWidth * .5 + spatium * .5;
595+
x = xNumber + numberWidth * .5 + numberGap;
595596
item->p2().rx() = std::max(item->p2().x(), x + 0.5 * l1); // ensure enough space for the number
596597
y = item->p1().y() + (x - item->p1().x()) * slope;
597598
item->bracketR[0] = PointF(x, y - l1);
@@ -606,15 +607,15 @@ void TupletLayout::layoutBracket(Tuplet* item, const ChordRest* cr1, const Chord
606607
} else {
607608
if (item->number()) {
608609
//set width of bracket hole
609-
double x = xNumber - numberWidth * .5 - spatium * .5;
610+
double x = xNumber - numberWidth * .5 - numberGap;
610611
item->p1().rx() = std::min(item->p1().x(), x - 0.5 * l1); // ensure enough space for the number
611612
double y = item->p1().y() + (x - item->p1().x()) * slope;
612613
item->bracketL[0] = PointF(item->p1().x(), item->p1().y());
613614
item->bracketL[1] = PointF(item->p1().x(), item->p1().y() + l1);
614615
item->bracketL[2] = PointF(x, y + l1);
615616

616617
//set width of bracket hole
617-
x = xNumber + numberWidth * .5 + spatium * .5;
618+
x = xNumber + numberWidth * .5 + numberGap;
618619
item->p2().rx() = std::max(item->p2().x(), x + 0.5 * l1);
619620
y = item->p1().y() + (x - item->p1().x()) * slope;
620621
item->bracketR[0] = PointF(x, y + l1);

0 commit comments

Comments
 (0)