From 1c53f05e4fbb8462240b08d0f0014efef81911e3 Mon Sep 17 00:00:00 2001 From: Travis Abendshien Date: Mon, 2 Sep 2024 00:43:11 -0700 Subject: [PATCH] chore: ensure splash width is `int` --- tagstudio/src/qt/ts_qt.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tagstudio/src/qt/ts_qt.py b/tagstudio/src/qt/ts_qt.py index 21f79d1c..0dee6580 100644 --- a/tagstudio/src/qt/ts_qt.py +++ b/tagstudio/src/qt/ts_qt.py @@ -293,13 +293,15 @@ class QtDriver(QObject): splash_pixmap = QPixmap(":/images/splash.png") splash_pixmap.setDevicePixelRatio(self.main_window.devicePixelRatio()) splash_pixmap = splash_pixmap.scaledToWidth( - min( - ( - QGuiApplication.primaryScreen().geometry().width() - * self.main_window.devicePixelRatio() + math.floor( + min( + ( + QGuiApplication.primaryScreen().geometry().width() + * self.main_window.devicePixelRatio() + ) + / 4, + splash_pixmap.width(), ) - // 4, - splash_pixmap.width(), ), Qt.TransformationMode.SmoothTransformation, )