@@ -1542,12 +1542,11 @@ void TLayout::layoutFBox(const FBox* item, FBox::LayoutData* ldata, const Layout
1542
1542
RectF fretRect = fretDiagram->ldata ()->bbox ();
1543
1543
1544
1544
const Harmony::LayoutData* harmonyLdata = fretDiagram->harmony ()->ldata ();
1545
- RectF harmonyRect = harmonyLdata->bbox ();
1546
- harmonyRect.moveTo (harmonyLdata->pos ());
1545
+ RectF harmonyRect = harmonyLdata->bbox ().translated (harmonyLdata->pos ());
1547
1546
1548
1547
double height = fretRect.united (harmonyRect).height ();
1549
1548
maxRowHeight = std::max (maxRowHeight, height);
1550
- maxHarmonyHeight = std::max (maxHarmonyHeight, harmonyRect.height ());
1549
+ maxHarmonyHeight = std::max (maxHarmonyHeight, - harmonyRect.top ());
1551
1550
harmonyBaseline = std::max (harmonyBaseline, fretDiagram->harmony ()->baseLine ());
1552
1551
}
1553
1552
@@ -1574,8 +1573,6 @@ void TLayout::layoutFBox(const FBox* item, FBox::LayoutData* ldata, const Layout
1574
1573
: alignH == AlignH::RIGHT ? width - totalTableWidth : 0.0 ;
1575
1574
const double startY = topMargin;
1576
1575
1577
- const double shapeMarginAboveDiagram = ctx.conf ().styleMM (Sid::harmonyFretDist).val () * 1.5 ;
1578
-
1579
1576
double bottomY = 0.0 ;
1580
1577
1581
1578
for (size_t i = 0 ; i < totalDiagrams; ++i) {
@@ -1607,7 +1604,7 @@ void TLayout::layoutFBox(const FBox* item, FBox::LayoutData* ldata, const Layout
1607
1604
harmony->mutldata ()->moveY (-(harmonyBaselines[row]) + baseLineAdjust);
1608
1605
1609
1606
double fretDiagramX = x;
1610
- double fretDiagramY = y + harmonyHeights[row] + shapeMarginAboveDiagram ;
1607
+ double fretDiagramY = y + harmonyHeights[row];
1611
1608
1612
1609
fretDiagram->mutldata ()->setPos (PointF (fretDiagramX, fretDiagramY));
1613
1610
0 commit comments