mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-01 00:04:27 +08:00
30 lines
1020 B
Python
30 lines
1020 B
Python
# 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("Proxima Nova Rg", 20))
|
|
painter.drawText(0, 0, 203, 230, Qt.AlignRight | Qt.AlignBottom, version[0])
|
|
if len(version) > 1:
|
|
painter.setFont(QFont("Proxima Nova Rg", 12))
|
|
painter.drawText(0, 0, 203, 255, Qt.AlignRight | Qt.AlignBottom, version[1])
|
|
|
|
painter.restore()
|
|
super().drawContents(painter)
|