Skip to content

Commit 1e4883c

Browse files
committed
fix(ui): scale splash screen with screen width
1 parent ca08ce5 commit 1e4883c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tagstudio/src/qt/ts_qt.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,18 @@ def start(self) -> None:
292292

293293
splash_pixmap = QPixmap(":/images/splash.png")
294294
splash_pixmap.setDevicePixelRatio(self.main_window.devicePixelRatio())
295+
splash_pixmap = splash_pixmap.scaledToWidth(
296+
min(
297+
(
298+
QGuiApplication.primaryScreen().geometry().width()
299+
* self.main_window.devicePixelRatio()
300+
)
301+
// 4,
302+
splash_pixmap.width(),
303+
),
304+
Qt.TransformationMode.SmoothTransformation,
305+
)
295306
self.splash = QSplashScreen(splash_pixmap, Qt.WindowStaysOnTopHint) # type: ignore
296-
# self.splash.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
297307
self.splash.show()
298308

299309
if os.name == "nt":

0 commit comments

Comments
 (0)