mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Fix providing floats to integer parameters
In newer Python versions this results in a warning. Contributes to issue CURA-7501.
This commit is contained in:
parent
28a0604951
commit
ef1952f34c
1 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2017 Ultimaker B.V.
|
||||
# Copyright (c) 2020 Ultimaker B.V.
|
||||
# Uranium is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from PyQt5.QtCore import Qt, QCoreApplication, QTimer
|
||||
|
@ -70,20 +70,20 @@ class CuraSplashScreen(QSplashScreen):
|
|||
font = QFont() # Using system-default font here
|
||||
font.setPixelSize(18)
|
||||
painter.setFont(font)
|
||||
painter.drawText(60, 70 + self._version_y_offset, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0])
|
||||
painter.drawText(60, 70 + self._version_y_offset, round(330 * self._scale), round(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 + self._version_y_offset, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[1])
|
||||
painter.drawText(247, 105 + self._version_y_offset, round(330 * self._scale), round(255 * self._scale), Qt.AlignLeft | Qt.AlignTop, version[1])
|
||||
painter.setPen(QColor(255, 255, 255, 255))
|
||||
|
||||
# Draw the loading image
|
||||
pen = QPen()
|
||||
pen.setWidth(6 * self._scale)
|
||||
pen.setWidthF(6 * self._scale)
|
||||
pen.setColor(QColor(32, 166, 219, 255))
|
||||
painter.setPen(pen)
|
||||
painter.drawArc(60, 150, 32 * self._scale, 32 * self._scale, self._loading_image_rotation_angle * 16, 300 * 16)
|
||||
painter.drawArc(60, 150, round(32 * self._scale), round(32 * self._scale), round(self._loading_image_rotation_angle * 16), 300 * 16)
|
||||
|
||||
# Draw message text
|
||||
if self._current_message:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue