]> granicus.if.org Git - nethack/commitdiff
Qt splash window again
authorPatR <rankin@nethack.org>
Sat, 15 Jan 2022 18:14:11 +0000 (10:14 -0800)
committerPatR <rankin@nethack.org>
Sat, 15 Jan 2022 18:14:11 +0000 (10:14 -0800)
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

index 3557cec4b4bcb69a87926aab685783eebac36076..f5592b504ab836293f159ea8f1e185302f3c109e 100644 (file)
@@ -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();