Skip to content

Commit

Permalink
Improved layout of brackets when Leland font is used
Browse files Browse the repository at this point in the history
  • Loading branch information
vpereverzev committed Nov 17, 2020
1 parent f29e2f1 commit 079a688
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libmscore/bracket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void Bracket::layout()
qreal w = score()->styleP(Sid::bracketWidth) * .5;
qreal x = -w;

qreal bd = _spatium * .25;
qreal bd = (score()->styleSt(Sid::MusicalSymbolFont) == "Leland") ? _spatium * .5 : _spatium * .25;
_shape.add(QRectF(x, -bd, w * 2, 2 * (h2+bd)));
_shape.add(symBbox(SymId::bracketTop).translated(QPointF(-w, -bd)));
_shape.add(symBbox(SymId::bracketBottom).translated(QPointF(-w, bd + 2*h2)));
Expand Down Expand Up @@ -255,7 +255,7 @@ void Bracket::draw(QPainter* painter) const
qreal h = 2 * h2;
qreal _spatium = spatium();
qreal w = score()->styleP(Sid::bracketWidth);
qreal bd = _spatium * .25;
qreal bd = (score()->styleSt(Sid::MusicalSymbolFont) == "Leland") ? _spatium * .5 : _spatium * .25;
QPen pen(curColor(), w, Qt::SolidLine, Qt::FlatCap);
painter->setPen(pen);
painter->drawLine(QLineF(0.0, -bd - w * .5, 0.0, h + bd + w * .5));
Expand Down

0 comments on commit 079a688

Please sign in to comment.