Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piano roll vertical zoom #5442

Merged
merged 10 commits into from
Apr 30, 2020
3 changes: 2 additions & 1 deletion src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2868,7 +2868,8 @@ void PianoRoll::paintEvent(QPaintEvent * pe )
// set font-size to 8
p.setFont( pointSize<8>( p.font() ) );
QFontMetrics fontMetrics(p.font());
int const fontHeight = fontMetrics.boundingRect(QChar::fromLatin1('H')).height();
QRect const boundingRect = fontMetrics.boundingRect(QChar::fromLatin1('H'));
int const fontHeight = - boundingRect.top() - boundingRect.bottom();
PhysSong marked this conversation as resolved.
Show resolved Hide resolved

// y_offset is used to align the piano-keys on the key-lines
int y_offset = 0;
Expand Down