Apply smooth paging patch. New version 0.4.7.
[dorian] / widgets / splash.cpp
index f906c29..3d8e94b 100755 (executable)
@@ -1,7 +1,27 @@
 #include <QtGui>\r
 \r
 #include "splash.h"\r
+#include "platform.h"\r
+#include "settings.h"\r
+#include "trace.h"\r
 \r
-Splash::Splash(): QSplashScreen(QPixmap(":/icons/splash.jpg"))\r
+Splash::Splash(): QSplashScreen()\r
 {\r
+    TRACE;\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
+    // Force landscape: QSplash seems to be broken in portrait\r
+    platform->setOrientation(this, "landscape");\r
+    setPixmap(QPixmap(platform->icon("splash-landscape", ".jpg")));\r
+#endif\r
 }\r