diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-06-29 14:57:04 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-06-30 12:37:14 +0000 |
commit | 76550ed353cdcaf8be8c867bef9c112c7d198fc5 (patch) | |
tree | 81aa5c1f0109226b094ed57b6d129452f1bb885f /tests/manual/highdpi/main.cpp | |
parent | 47b3e5327500eaeb4dfdccb827139a8f3c75e6c9 (diff) |
Use proper line spacing for font test
Since we're making things look pretty :)
Change-Id: Ibc2e5f7315b9ecf789b8c7cdbf100632b9a2b4c0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'tests/manual/highdpi/main.cpp')
-rw-r--r-- | tests/manual/highdpi/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/manual/highdpi/main.cpp b/tests/manual/highdpi/main.cpp index b69353ae25..692a60d511 100644 --- a/tests/manual/highdpi/main.cpp +++ b/tests/manual/highdpi/main.cpp @@ -541,19 +541,19 @@ public: 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); } } }; |