[vlc-commits] Qt: fix an annoying resizing issue.

Jean-Baptiste Kempf git at videolan.org
Sun Apr 29 23:49:13 CEST 2012


vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Apr 23 18:25:37 2012 +0200| [acce7567fa65a6355524e0ce185a0790858c4753] | committer: Jean-Baptiste Kempf

Qt: fix an annoying resizing issue.

That was resizing when video was stacked in the playlist
(cherry picked from commit 66b3569cecf9fb671e21bc672922295618971ef8)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

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

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 25cc89a..8ea980d 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -210,7 +210,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
             CONNECT( this, askVideoToResize( unsigned int, unsigned int ),
                      this, setVideoSize( unsigned int, unsigned int ) );
             CONNECT( videoWidget, sizeChanged( int, int ),
-                     this, resizeStack( int,  int ) );
+                     this, videoSizeChanged( int,  int ) );
         }
         CONNECT( this, askVideoSetFullScreen( bool ),
                  this, setVideoFullScreen( bool ) );
@@ -680,6 +680,12 @@ void MainInterface::setVideoSize( unsigned int w, unsigned int h )
         videoWidget->SetSizing( w, h );
 }
 
+void MainInterface::videoSizeChanged( int w, int h )
+{
+    if( !playlistWidget || playlistWidget->artContainer->currentWidget() != videoWidget )
+        resizeStack( w, h );
+}
+
 void MainInterface::setVideoFullScreen( bool fs )
 {
     b_videoFullScreen = fs;
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 1231d25..f2489bb 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -238,6 +238,7 @@ private slots:
     }
 
     void setVideoSize( unsigned int, unsigned int );
+    void videoSizeChanged( int, int );
     void setVideoFullScreen( bool );
     void setVideoOnTop( bool );
     void setBoss();



More information about the vlc-commits mailing list