diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 34ad2ff790..cd56362ed3 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -38,6 +38,7 @@ from . import PrintInformation from . import CuraActions from . import MultiMaterialDecorator from . import ZOffsetDecorator +from . import CuraSplashScreen from PyQt5.QtCore import pyqtSlot, QUrl, Qt, pyqtSignal, pyqtProperty, QEvent, Q_ENUMS from PyQt5.QtGui import QColor, QIcon @@ -515,6 +516,9 @@ class CuraApplication(QtApplication): for node in ungrouped_nodes: Selection.remove(node) + def _createSplashScreen(self): + return CuraSplashScreen.CuraSplashScreen() + def _onActiveMachineChanged(self): machine = self.getMachineManager().getActiveMachineInstance() if machine: diff --git a/cura/CuraSplashScreen.py b/cura/CuraSplashScreen.py new file mode 100644 index 0000000000..d2f9ad8d61 --- /dev/null +++ b/cura/CuraSplashScreen.py @@ -0,0 +1,28 @@ +# Copyright (c) 2015 Ultimaker B.V. +# Uranium is released under the terms of the AGPLv3 or higher. + +from PyQt5.QtCore import Qt +from PyQt5.QtGui import QPixmap, QColor, QFont +from PyQt5.QtWidgets import QSplashScreen + +from UM.Resources import Resources +from UM.Application import Application + +class CuraSplashScreen(QSplashScreen): + def __init__(self): + super().__init__() + self.setPixmap(QPixmap(Resources.getPath(Resources.Images, "cura.png"))) + + def drawContents(self, painter): + painter.save() + painter.setPen(QColor(0, 0, 0, 255)) + + version = Application.getInstance().getVersion().split("-") + + painter.setFont(QFont("Roboto", 20)) + painter.drawText(0, 0, 203, 230, Qt.AlignRight | Qt.AlignBottom, version[0]) + painter.setFont(QFont("Roboto", 12)) + painter.drawText(0, 0, 203, 255, Qt.AlignRight | Qt.AlignBottom, version[1]) + + painter.restore() + super().drawContents(painter) diff --git a/resources/images/cura.png b/resources/images/cura.png index 53a8ca71f5..0bf87af165 100644 Binary files a/resources/images/cura.png and b/resources/images/cura.png differ