New version 0.4.6.
[dorian] / widgets / splash.cpp
index de42680..b149e5e 100755 (executable)
@@ -1,8 +1,23 @@
 #include <QtGui>\r
 \r
 #include "splash.h"\r
+#include "platform.h"\r
 \r
-Splash::Splash(): QSplashScreen(QPixmap(":/icons/splash.jpg").scaled(360, 518,\r
-                      Qt::IgnoreAspectRatio, Qt::SmoothTransformation))\r
+Splash::Splash(): QSplashScreen()\r
 {\r
+    Platform *platform = Platform::instance();\r
+#if defined(Q_OS_SYMBIAN)\r
+    QRect geo = QApplication::desktop()->availableGeometry();\r
+    if (geo.width() < geo.height()) {\r
+        setPixmap(QPixmap(platform->icon("splash", ".jpg")).scaled(360, 518,\r
+            Qt::IgnoreAspectRatio, Qt::SmoothTransformation));\r
+    } else {\r
+        setPixmap(QPixmap(platform->icon("splash-landscape", ".jpg")).\r
+            scaled(520, 330,\r
+                   Qt::IgnoreAspectRatio, Qt::SmoothTransformation));\r
+    }\r
+#elif defined(Q_WS_MAEMO_5)\r
+    platform->setOrientation(this, "landscape");\r
+    setPixmap(QPixmap(platform->icon("splash-landscape", ".jpg")));\r
+#endif\r
 }\r