Skip to content

Commit 49801cc

Browse files
committed
fix harmony layout
1 parent c3c940a commit 49801cc

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

libmscore/harmony.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -536,28 +536,23 @@ void Harmony::layout()
536536
Text::layout1();
537537
else {
538538
// textStyle().layout(this);
539-
if (!parent()) {
540-
setPos(QPointF(0.0, 0.0));
541-
return;
542-
}
543-
544539
QRectF bb;
545540
foreach(const TextSegment* ts, textList)
546541
bb |= ts->boundingRect().translated(ts->x, ts->y);
547542
setbbox(bb);
548543
}
549-
if (parent() == 0) { // for use in palette
544+
if (!parent()) { // for use in palette
550545
setPos(QPointF());
551546
return;
552547
}
553548

554-
qreal yy;
549+
qreal yy = 0.0;
555550
if (parent()->type() == SEGMENT) {
556551
Measure* m = static_cast<Measure*>(parent()->parent());
557552
yy = track() < 0 ? 0.0 : m->system()->staff(staffIdx())->y();
558-
yy -= (bbox().height() + score()->styleP(ST_harmonyY));
553+
yy += score()->styleP(ST_harmonyY);
559554
}
560-
else {
555+
else if (parent()->type() == FRET_DIAGRAM) {
561556
yy = score()->styleP(ST_harmonyFretDist);
562557
}
563558
setPos(QPointF(0.0, yy));

libmscore/style.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ StyleData::StyleData()
484484

485485
StyleVal(ST_pedalY, Spatium(8)),
486486
StyleVal(ST_trillY, Spatium(-1)),
487-
StyleVal(ST_harmonyY, Spatium(-4)),
487+
StyleVal(ST_harmonyY, Spatium(-2.5)),
488488
StyleVal(ST_harmonyFretDist, Spatium(-1.5)),
489489

490490
StyleVal(ST_showPageNumber, true),

mscore/editstyle.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3607,7 +3607,7 @@ p, li { white-space: pre-wrap; }
36073607
<double>10000.000000000000000</double>
36083608
</property>
36093609
<property name="singleStep">
3610-
<double>1.500000000000000</double>
3610+
<double>0.500000000000000</double>
36113611
</property>
36123612
<property name="value">
36133613
<double>-4.000000000000000</double>

0 commit comments

Comments
 (0)