Smoothen switch between full screen/normal view on Maemo.
[dorian] / mainwindow.cpp
index c8f5dfe..4ab3b90 100755 (executable)
@@ -81,7 +81,7 @@ MainWindow::MainWindow(QWidget *parent):
 
     rotateAction = addToolBarAction(this, SLOT(rotate()),
                                     "rotate", tr("Rotate"), true);
-    // addToolBarSpace();
+    addToolBarSpace();
     fullScreenAction = addToolBarAction(this, SLOT(showBig()),
         "view-fullscreen", tr("Full screen"), true);
 
@@ -185,12 +185,8 @@ void MainWindow::showRegular()
     // Re-parent children
     fullScreenWindow->leaveBookView();
     takeBookView(view, prog, prev, next);
-    fullScreenWindow->hide();
 
-#ifdef Q_OS_SYMBIAN
-    view->setFixedSize(Platform::availableSize().width(),
-        Platform::availableSize().height() - Platform::softKeyHeight());
-#endif
+    fullScreenWindow->hide();
     show();
 }
 
@@ -201,10 +197,11 @@ void MainWindow::showBig()
     // Re-parent children
     leaveBookView();
     fullScreenWindow->takeBookView(view, prog, prev, next);
-    hide();
 
-#ifdef Q_OS_SYMBIAN
-    view->setFixedSize(Platform::size());
+#ifdef Q_WS_MAEMO_5
+    fullScreenWindow->raise();
+#else
+    hide();
 #endif
     fullScreenWindow->showFullScreen();
 }
@@ -237,7 +234,7 @@ void MainWindow::rotate()
 
 void MainWindow::showDevTools()
 {
-    (new DevTools())->exec();
+    (new DevTools(this))->exec();
 }
 
 void MainWindow::showBookmarks()