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.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user