Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjen Hiemstra <ahiemstra@heimr.nl>2015-11-17 12:11:41 +0300
committerArjen Hiemstra <ahiemstra@heimr.nl>2015-11-17 12:11:41 +0300
commit52310738272e217e0723f574870fbe9e45928e12 (patch)
treed68ac1a1351c0ee91def992233c400c5cd497825 /cura/CuraSplashScreen.py
parent3e2797d72758d3deb22c0336efdaec26bd009b6c (diff)
Display the version number in the splash screen
Diffstat (limited to 'cura/CuraSplashScreen.py')
-rw-r--r--cura/CuraSplashScreen.py28
1 files changed, 28 insertions, 0 deletions
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)