[vlc-devel] commit: Yet again a try to fix the sizing behaviour when too big... ( Jean-Baptiste Kempf )

git version control git at videolan.org
Sun Sep 7 09:49:54 CEST 2008


vlc | branch: 0.9-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Sun Sep  7 00:18:02 2008 -0700| [6f69173f73662ee761dc473c182051a5ea5b9119] | committer: Jean-Baptiste Kempf 

Yet again a try to fix the sizing behaviour when too big...

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

 modules/gui/qt4/components/interface_widgets.cpp |    2 +-
 modules/gui/qt4/main_interface.cpp               |   21 +++++++++++++++------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 7612643..b5767c3 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -73,7 +73,7 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
     hide();
 
     /* Set the policy to expand in both directions */
-    setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+//    setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
 
     /* Black background is more coherent for a Video Widget */
     QPalette plt =  palette();
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index cee1db9..814af7c 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -607,11 +607,9 @@ void MainInterface::debug()
     msg_Dbg( p_intf, "sizeHint: %i - %i", sizeHint().height(), sizeHint().width() );
     if( videoWidget && videoWidget->isVisible() )
     {
-        //    sleep( 10 );
         msg_Dbg( p_intf, "size: %i - %i", size().height(), size().width() );
         msg_Dbg( p_intf, "sizeHint: %i - %i", sizeHint().height(), sizeHint().width() );
     }
-    adjustSize();
 #endif
 }
 
@@ -774,8 +772,8 @@ void MainInterface::togglePlaylist()
     {
     /* toggle the visibility of the playlist */
        TOGGLEV( playlistWidget );
-       //resize( sizeHint() );
        playlistVisible = !playlistVisible;
+       //doComponentsUpdate(); //resize( sizeHint() );
     }
 }
 
@@ -783,7 +781,7 @@ void MainInterface::togglePlaylist()
 void MainInterface::undockPlaylist()
 {
 //    dockPL->setFloating( true );
-    adjustSize();
+//    adjustSize();
 }
 
 void MainInterface::dockPlaylist( pl_dock_e i_pos )
@@ -814,11 +812,22 @@ void MainInterface::toggleMinimalView()
 
 /* Video widget cannot do this synchronously as it runs in another thread */
 /* Well, could it, actually ? Probably dangerous ... */
+
+/* This function is called:
+   - toggling of minimal View
+   - through askUpdate() by Vout thread request video and resize video (zoom)
+   - Advanced buttons toggled
+ */
 void MainInterface::doComponentsUpdate()
 {
     msg_Dbg( p_intf, "Updating the geometry" );
-    //    resize( sizeHint() );
-    adjustSize();
+    /* Here we resize to sizeHint() and not adjustsize because we want
+       the videoWidget to be exactly the correctSize */
+    resize( sizeHint() );
+    //    adjustSize()  ;
+#ifndef NDEBUG
+    debug();
+#endif
 }
 
 /* toggling advanced controls buttons */




More information about the vlc-devel mailing list