Update splash screen
CURA-4416
Lipu Fei
6 years ago
0 | 0 | # Copyright (c) 2017 Ultimaker B.V. |
1 | 1 | # Uranium is released under the terms of the LGPLv3 or higher. |
2 | ||
3 | from threading import Thread, Event | |
4 | 2 | |
5 | 3 | from PyQt5.QtCore import Qt, QCoreApplication, QTimer |
6 | 4 | from PyQt5.QtGui import QPixmap, QColor, QFont, QPen, QPainter |
8 | 6 | |
9 | 7 | from UM.Resources import Resources |
10 | 8 | from UM.Application import Application |
9 | ||
11 | 10 | |
12 | 11 | class CuraSplashScreen(QSplashScreen): |
13 | 12 | def __init__(self): |
25 | 24 | self._change_timer = QTimer() |
26 | 25 | self._change_timer.setInterval(50) |
27 | 26 | self._change_timer.setSingleShot(False) |
28 | #self.timeoutSignal.connect(self._onTimeout) | |
29 | 27 | self._change_timer.timeout.connect(self.updateLoadingImage) |
30 | 28 | |
31 | 29 | def show(self): |
61 | 59 | font = QFont() # Using system-default font here |
62 | 60 | font.setPixelSize(37) |
63 | 61 | painter.setFont(font) |
64 | painter.drawText(220, 66, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0]) | |
62 | painter.drawText(215, 66, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0]) | |
65 | 63 | if len(version) > 1: |
66 | 64 | font.setPointSize(12) |
67 | 65 | painter.setFont(font) |
68 | 66 | painter.setPen(QColor(200, 200, 200, 255)) |
69 | painter.drawText(252, 105, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[1]) | |
67 | painter.drawText(247, 105, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[1]) | |
70 | 68 | painter.setPen(QColor(255, 255, 255, 255)) |
71 | 69 | |
72 | 70 | # draw the loading image |
Binary diff not shown