Skip to content

Commit

Permalink
Use proper line spacing for font test
Browse files Browse the repository at this point in the history
Since we're making things look pretty :)

Change-Id: Ibc2e5f7315b9ecf789b8c7cdbf100632b9a2b4c0
Reviewed-by: Morten Johan Sørvig <[email protected]>
  • Loading branch information
Paul Olav Tvete authored and msorvig committed Jun 30, 2015
1 parent 47b3e53 commit 76550ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/manual/highdpi/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,19 +541,19 @@ class Fonts : public QWidget
font.setPointSize(fontSize);
QString string = QString(QStringLiteral("This text is in point size %1")).arg(fontSize);
painter.setFont(font);
y += (painter.fontMetrics().lineSpacing());
painter.drawText(10, y, string);
y += (fontSize * 2.5);
}

// Pixels
y = 160;
y += painter.fontMetrics().lineSpacing();
for (int fontSize = 6; fontSize < 18; fontSize += 2) {
QFont font;
font.setPixelSize(fontSize);
QString string = QString(QStringLiteral("This text is in pixel size %1")).arg(fontSize);
painter.setFont(font);
y += (painter.fontMetrics().lineSpacing());
painter.drawText(10, y, string);
y += (fontSize * 2.5);
}
}
};
Expand Down

0 comments on commit 76550ed

Please sign in to comment.