[vlc-commits] Qt: hide the resume panel without affecting the vout geometry (refs #12758 )

Ludovic Fauvet git at videolan.org
Mon Nov 24 19:28:14 CET 2014


vlc/vlc-2.2 | branch: master | Ludovic Fauvet <etix at videolan.org> | Mon Nov 24 16:07:49 2014 +0100| [abcfb6cd0f7132a0f278d92b614a897534ac8fd8] | committer: Jean-Baptiste Kempf

Qt: hide the resume panel without affecting the vout geometry (refs #12758)

One corner case still remains when leaving the fullscreen since we
cannot resize the UI in this mode.

(cherry picked from commit c7acc87279732139580b8f3f674babee5ef3c1c0)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=abcfb6cd0f7132a0f278d92b614a897534ac8fd8
---

 modules/gui/qt4/main_interface.cpp |   16 +++++++++++++---
 modules/gui/qt4/main_interface.hpp |    1 +
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 4734749..a72fae8 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -387,7 +387,7 @@ void MainInterface::createContinueDialog( QWidget *w )
     continueDialogLayout->addWidget( ok );
     continueDialogLayout->addWidget( cancel );
 
-    CONNECT( cancel, clicked(), continueDialog, hide() );
+    CONNECT( cancel, clicked(), this, hideContinueDialog() );
     BUTTONACT(ok, continuePlayback() );
 
     CONNECT( THEMIM->getIM(), continuePlayback(int64_t), this, showContinueDialog(int64_t) );
@@ -408,14 +408,24 @@ void MainInterface::showContinueDialog( int64_t _time ) {
     else
     {
         continueDialog->setVisible(true);
-        QTimer::singleShot(6000, continueDialog, SLOT(hide()));
+        QTimer::singleShot(6000, this, SLOT(hideContinueDialog()));
+    }
+}
+
+void MainInterface::hideContinueDialog()
+{
+    if( continueDialog->isVisible() )
+    {
+        if( !isFullScreen() && !isMaximized() )
+            resize( width(), height() - continueDialog->height() );
+        continueDialog->hide();
     }
 }
 
 void MainInterface::continuePlayback()
 {
     var_SetTime( THEMIM->getInput(), "time", i_continueTime );
-    continueDialog->hide();
+    hideContinueDialog();
 }
 
 void MainInterface::createMainWidget( QSettings *creationSettings )
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index e3f36a7..3c769f8 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -260,6 +260,7 @@ private slots:
     void setRaise();
 
     void showContinueDialog( int64_t);
+    void hideContinueDialog();
     void continuePlayback();
 
 signals:



More information about the vlc-commits mailing list