From 9550ea1274b97a44a1f4aa1872aa6841cad32d51 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 15 Jan 2022 10:14:11 -0800 Subject: [PATCH] Qt splash window again Redo the fix that was used to eliminate a Qt6 compile-time warning. The splash image is a square and doesn't need any clipping mask. --- win/Qt/qt_bind.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/win/Qt/qt_bind.cpp b/win/Qt/qt_bind.cpp index 3557cec4b..f5592b504 100644 --- a/win/Qt/qt_bind.cpp +++ b/win/Qt/qt_bind.cpp @@ -107,7 +107,8 @@ NetHackQtBind::NetHackQtBind(int& argc, char** argv) : } // before the game windows have been rendered, display a small, centered -// window showing a red dragon with caption "Loading..." +// window showing a flying red dragon ridden by someone wielding a lance, +// with caption "Loading..." void NetHackQtBind::qt_Splash() { @@ -121,18 +122,11 @@ NetHackQtBind::qt_Splash() vb->addWidget(lsplash); lsplash->setAlignment(Qt::AlignCenter); lsplash->setPixmap(pm); + lsplash->setFixedSize(pm.size()); + //lsplash->setMask(pm.mask()); QLabel *capt = new QLabel("Loading...", splash); vb->addWidget(capt); capt->setAlignment(Qt::AlignCenter); - lsplash->setFixedSize(pm.size()); - -#if QT_VERSION < 0x040000 - // if used on 5.11, this produces a fuzzy image - lsplash->setMask(QBitmap(pm)); -#else - // required for 6.2; on 5.11, this produces a crisp image - lsplash->setPixmap(pm); -#endif #if QT_VERSION < 0x060000 QSize screensize = QApplication::desktop()->size(); -- 2.49.0