mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 05:53:59 -06:00
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.
This commit is contained in:
parent
7394a0c6ef
commit
565ed4933b
1 changed files with 2 additions and 5 deletions
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue