]> git.sur5r.net Git - minitube/commitdiff
full screen refinements
authorFlavio Tordini <flavio.tordini@gmail.com>
Thu, 2 Jul 2009 10:50:18 +0000 (12:50 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Thu, 2 Jul 2009 10:50:18 +0000 (12:50 +0200)
src/MainWindow.cpp

index a0944b8e5514c8d58ee86833384863bf05aa4d22..2e9406b5a8aea036c0f1dcf77014dcf16a91b109 100755 (executable)
@@ -313,6 +313,9 @@ void MainWindow::readSettings() {
 }
 
 void MainWindow::writeSettings() {
+    // do not save geometry when in full screen
+    if (m_fullscreen)
+        return;
     QSettings settings;
     settings.setValue("geometry", saveGeometry());
 }
@@ -496,14 +499,23 @@ void MainWindow::fullscreen() {
         fullscreenAct->setShortcuts(shortcuts);
         fullscreenAct->setText(tr("Exit &Full Screen"));
         m_maximized = isMaximized();
+
+        // save geometry now, if the user quits when in full screen
+        // geometry won't be saved
+        writeSettings();
+
         showFullScreen();
     }
+
+    // No compact view action when in full screen
     compactViewAct->setVisible(m_fullscreen);
+
+    // Hide anything but the video
     mediaView->setPlaylistVisible(m_fullscreen);
     mainToolBar->setVisible(m_fullscreen);
     statusBar()->setVisible(m_fullscreen);
     menuBar()->setVisible(m_fullscreen);
-    menuBar()->setEnabled(true);
+
     m_fullscreen = !m_fullscreen;
 
 }