Implement changes from a code review

Use tabs in the style sheets. Make the calculation of the Y offset more
concise.
This commit is contained in:
Michael Gregorius
2018-07-09 17:16:40 +02:00
parent 0dc28436fa
commit 8dab817e13
3 changed files with 4 additions and 3 deletions

View File

@@ -894,12 +894,13 @@ void PianoRoll::drawNoteRect( QPainter & p, int x, int y,
int const distanceToBorder = 2;
int const xOffset = borderWidth + distanceToBorder;
int const yOffset = (noteHeight + noteTextHeight) / 2;
if (textSize.width() < noteWidth - xOffset)
{
p.setPen(noteTextColor);
p.setFont(noteFont);
QPoint textStart(x + xOffset, y + (noteTextHeight + (noteHeight - noteTextHeight) / 2));
QPoint textStart(x + xOffset, y + yOffset);
p.drawText(textStart, noteKeyString);
}