From 565ed4933b5b7fca8f3a9546aa11010e9c5394dd Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 26 Sep 2017 11:56:14 +0200 Subject: [PATCH] Use pixels instead of points for text in splash-screen The current splashscreen implementation uses DPI-independent pixel sizes for everything, but point sizes take the DPI into account. This caused too large text and misalignment in the splash screen on Hi DPI screens on Windows. --- cura/CuraSplashScreen.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cura/CuraSplashScreen.py b/cura/CuraSplashScreen.py index eedf1e3d53..f340c01623 100644 --- a/cura/CuraSplashScreen.py +++ b/cura/CuraSplashScreen.py @@ -10,7 +10,6 @@ from PyQt5.QtWidgets import QSplashScreen from UM.Resources import Resources from UM.Application import Application - class CuraSplashScreen(QSplashScreen): def __init__(self): super().__init__() @@ -61,7 +60,7 @@ class CuraSplashScreen(QSplashScreen): # draw version text font = QFont() # Using system-default font here - font.setPointSize(28) + font.setPixelSize(37) painter.setFont(font) painter.drawText(220, 66, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0]) if len(version) > 1: @@ -81,7 +80,7 @@ class CuraSplashScreen(QSplashScreen): # draw message text if self._current_message: font = QFont() # Using system-default font here - font.setPointSize(10) + font.setPixelSize(13) pen = QPen() pen.setColor(QColor(255, 255, 255, 255)) painter.setPen(pen) @@ -107,5 +106,3 @@ class CuraSplashScreen(QSplashScreen): self._to_stop = True self._change_timer.stop() super().close() - -