Skip to content

Commit 1c53f05

Browse files
committed
chore: ensure splash width is int
1 parent 1e4883c commit 1c53f05

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tagstudio/src/qt/ts_qt.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,15 @@ def start(self) -> None:
293293
splash_pixmap = QPixmap(":/images/splash.png")
294294
splash_pixmap.setDevicePixelRatio(self.main_window.devicePixelRatio())
295295
splash_pixmap = splash_pixmap.scaledToWidth(
296-
min(
297-
(
298-
QGuiApplication.primaryScreen().geometry().width()
299-
* self.main_window.devicePixelRatio()
296+
math.floor(
297+
min(
298+
(
299+
QGuiApplication.primaryScreen().geometry().width()
300+
* self.main_window.devicePixelRatio()
301+
)
302+
/ 4,
303+
splash_pixmap.width(),
300304
)
301-
// 4,
302-
splash_pixmap.width(),
303305
),
304306
Qt.TransformationMode.SmoothTransformation,
305307
)

0 commit comments

Comments
 (0)