Skip to content

Commit

Permalink
Additional fixes to rpt position
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Oct 1, 2023
1 parent ec0b5ef commit d827621
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/view_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2031,10 +2031,10 @@ void View::DrawMRptPart(DeviceContext *dc, int xCentered, char32_t rptGlyph, int
TextExtend extend;
const std::u32string figures = this->IntToTimeSigFigures(num);
dc->GetSmuflTextExtent(figures, &extend);
const int symHeight = m_doc->GetGlyphHeight(rptGlyph, staffSize, false);
const int symHeight = m_doc->GetGlyphHeight(rptGlyph, staffNotationSize, false);
const int yNum = (y > ySymbol + symHeight / 2)
? staff->GetDrawingY() + m_doc->GetDrawingUnit(staffSize) + extend.m_height / 2
: ySymbol + 3 * m_doc->GetDrawingUnit(staffSize) + extend.m_height / 2;
? staff->GetDrawingY() + m_doc->GetDrawingUnit(staffNotationSize) + extend.m_height / 2
: ySymbol + 3 * m_doc->GetDrawingUnit(staffNotationSize) + extend.m_height / 2;
dc->DrawMusicText(figures, ToDeviceContextX(xCentered - extend.m_width / 2), ToDeviceContextY(yNum));
dc->ResetFont();
}
Expand Down

0 comments on commit d827621

Please sign in to comment.