\r
#include "splash.h"\r
\r
-Splash::Splash(QWidget *parent): QMainWindow(parent)\r
+Splash::Splash(): QSplashScreen()\r
{\r
- QLabel *label = new QLabel(this);\r
- QRect geo = QApplication::desktop()->geometry();\r
- label->setGeometry(geo);\r
- label->setStyleSheet("background-color: white; color: white");\r
- label->setPixmap(QPixmap(":/icons/splash.jpg").scaled(geo.width(),\r
- geo.height(), Qt::KeepAspectRatio, Qt::SmoothTransformation));\r
- setCentralWidget(label);\r
+ QRect geo = QApplication::desktop()->availableGeometry();\r
+ if (geo.width() < geo.height()) {\r
+ setPixmap(QPixmap(":/icons/splash.jpg").scaled(360, 518,\r
+ Qt::IgnoreAspectRatio, Qt::SmoothTransformation));\r
+ } else {\r
+ setPixmap(QPixmap(":/icons/splash-landscape.jpg").scaled(520, 330,\r
+ Qt::IgnoreAspectRatio, Qt::SmoothTransformation));\r
+ }\r
}\r