Even more splash screen polishing.
authorAkos Polster <akos@pipacs.com>
Sun, 28 Nov 2010 16:16:21 +0000 (17:16 +0100)
committerAkos Polster <akos@pipacs.com>
Sun, 28 Nov 2010 16:16:21 +0000 (17:16 +0100)
widgets/splash.cpp

index de42680..243be58 100755 (executable)
@@ -2,7 +2,14 @@
 \r
 #include "splash.h"\r
 \r
-Splash::Splash(): QSplashScreen(QPixmap(":/icons/splash.jpg").scaled(360, 518,\r
-                      Qt::IgnoreAspectRatio, Qt::SmoothTransformation))\r
+Splash::Splash(): QSplashScreen()\r
 {\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