diff options
author | Nino van Hooff <ninovanhooff@gmail.com> | 2019-12-10 17:59:57 +0300 |
---|---|---|
committer | Nino van Hooff <ninovanhooff@gmail.com> | 2019-12-10 17:59:57 +0300 |
commit | d09f3492dbb9f9b99fc43cb02b51347ba0752596 (patch) | |
tree | 7af8b69063a83a55b1809c98673457b9c748ff38 /cura/UI | |
parent | da6d4e618624c535764cd29bb0e0fc196ae24bad (diff) |
Add enterprise splash screen.
Added it as a png, which might be a bit overkill but it could also
could be hard getting strokes / shadows exactly right otherwise. Also
Allows for more visual distinction of the background later
CURA-7011
Diffstat (limited to 'cura/UI')
-rw-r--r-- | cura/UI/CuraSplashScreen.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/cura/UI/CuraSplashScreen.py b/cura/UI/CuraSplashScreen.py index 05231c106d..c979553ca1 100644 --- a/cura/UI/CuraSplashScreen.py +++ b/cura/UI/CuraSplashScreen.py @@ -7,14 +7,21 @@ from PyQt5.QtWidgets import QSplashScreen from UM.Resources import Resources from UM.Application import Application +from cura import ApplicationMetadata class CuraSplashScreen(QSplashScreen): def __init__(self): super().__init__() self._scale = 0.7 + self._version_y_offset = 0 # when extra visual elements are in the background image, move version text down + + if ApplicationMetadata.IsEnterpriseVersion: + splash_image = QPixmap(Resources.getPath(Resources.Images, "cura_enterprise.png")) + self._version_y_offset = 32 + else: + splash_image = QPixmap(Resources.getPath(Resources.Images, "cura.png")) - splash_image = QPixmap(Resources.getPath(Resources.Images, "cura.png")) self.setPixmap(splash_image) self._current_message = "" @@ -52,20 +59,17 @@ class CuraSplashScreen(QSplashScreen): painter.setRenderHint(QPainter.Antialiasing, True) version = Application.getInstance().getVersion().split("-") - buildtype = Application.getInstance().getBuildType() - if buildtype: - version[0] += " (%s)" % buildtype # Draw version text font = QFont() # Using system-default font here - font.setPixelSize(37) + font.setPixelSize(18) painter.setFont(font) - painter.drawText(60, 66, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0]) + painter.drawText(60, 66 + self._version_y_offset, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0]) if len(version) > 1: font.setPixelSize(16) painter.setFont(font) painter.setPen(QColor(200, 200, 200, 255)) - painter.drawText(247, 105, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[1]) + painter.drawText(247, 105 + self._version_y_offset, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[1]) painter.setPen(QColor(255, 255, 255, 255)) # Draw the loading image |