mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
updated splash screens
This commit is contained in:
parent
f4e57b82f8
commit
044c3e9da2
4 changed files with 12 additions and 14 deletions
|
@ -14,7 +14,7 @@ import time
|
||||||
class CuraSplashScreen(QSplashScreen):
|
class CuraSplashScreen(QSplashScreen):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self._scale = 0.7
|
self._scale = 1
|
||||||
self._version_y_offset = 0 # when extra visual elements are in the background image, move version text down
|
self._version_y_offset = 0 # when extra visual elements are in the background image, move version text down
|
||||||
|
|
||||||
if ApplicationMetadata.IsAlternateVersion:
|
if ApplicationMetadata.IsAlternateVersion:
|
||||||
|
@ -69,23 +69,21 @@ class CuraSplashScreen(QSplashScreen):
|
||||||
version = Application.getInstance().getVersion().split("-")
|
version = Application.getInstance().getVersion().split("-")
|
||||||
|
|
||||||
# Draw version text
|
# Draw version text
|
||||||
font = QFont() # Using system-default font here
|
font = QFont()
|
||||||
font.setPixelSize(18)
|
font.setPixelSize(24)
|
||||||
painter.setFont(font)
|
painter.setFont(font)
|
||||||
painter.drawText(60, 70 + self._version_y_offset, round(330 * self._scale), round(230 * self._scale), Qt.AlignLeft | Qt.AlignTop, version[0] if not ApplicationMetadata.IsAlternateVersion else ApplicationMetadata.CuraBuildType)
|
|
||||||
if len(version) > 1:
|
if len(version) == 1:
|
||||||
font.setPixelSize(16)
|
painter.drawText(40, 104 + self._version_y_offset, round(330 * self._scale), round(230 * self._scale), Qt.AlignLeft | Qt.AlignTop, version[0] if not ApplicationMetadata.IsAlternateVersion else ApplicationMetadata.CuraBuildType)
|
||||||
painter.setFont(font)
|
elif len(version) > 1:
|
||||||
painter.setPen(QColor(200, 200, 200, 255))
|
painter.drawText(40, 104 + self._version_y_offset, round(330 * self._scale), round(230 * self._scale), Qt.AlignLeft | Qt.AlignTop, version[0] +" "+ version[1] if not ApplicationMetadata.IsAlternateVersion else ApplicationMetadata.CuraBuildType)
|
||||||
painter.drawText(247, 105 + self._version_y_offset, round(330 * self._scale), round(255 * self._scale), Qt.AlignLeft | Qt.AlignTop, version[1])
|
|
||||||
painter.setPen(QColor(255, 255, 255, 255))
|
|
||||||
|
|
||||||
# Draw the loading image
|
# Draw the loading image
|
||||||
pen = QPen()
|
pen = QPen()
|
||||||
pen.setWidthF(6 * self._scale)
|
pen.setWidthF(2 * self._scale)
|
||||||
pen.setColor(QColor(32, 166, 219, 255))
|
pen.setColor(QColor(255, 255, 255, 255))
|
||||||
painter.setPen(pen)
|
painter.setPen(pen)
|
||||||
painter.drawArc(60, 150, round(32 * self._scale), round(32 * self._scale), round(self._loading_image_rotation_angle * 16), 300 * 16)
|
painter.drawArc(38, 324, round(20 * self._scale), round(20 * self._scale), round(self._loading_image_rotation_angle * 16), 300 * 16)
|
||||||
|
|
||||||
# Draw message text
|
# Draw message text
|
||||||
if self._current_message:
|
if self._current_message:
|
||||||
|
@ -95,7 +93,7 @@ class CuraSplashScreen(QSplashScreen):
|
||||||
pen.setColor(QColor(255, 255, 255, 255))
|
pen.setColor(QColor(255, 255, 255, 255))
|
||||||
painter.setPen(pen)
|
painter.setPen(pen)
|
||||||
painter.setFont(font)
|
painter.setFont(font)
|
||||||
painter.drawText(100, 128, 170, 64,
|
painter.drawText(70, 320, 170, 24,
|
||||||
Qt.AlignLeft | Qt.AlignVCenter | Qt.TextWordWrap,
|
Qt.AlignLeft | Qt.AlignVCenter | Qt.TextWordWrap,
|
||||||
self._current_message)
|
self._current_message)
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 316 KiB |
Binary file not shown.
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 322 KiB |
Binary file not shown.
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 316 KiB |
Loading…
Add table
Add a link
Reference in a new issue