]> git.sesse.net Git - vlc/commitdiff
Work-around a Qt issue when starting in minimal mode
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 29 May 2010 23:03:09 +0000 (01:03 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 29 May 2010 23:05:05 +0000 (01:05 +0200)
Close #3573
How can the size of a widget be bigger than the size of its parent window? Really weird Qt bug

modules/gui/qt4/main_interface.hpp

index 689da2b457f1ba30dd0ec09827569f7941d913b9..3390190d443347db4144ed0c7ef44c99501f6d46 100644 (file)
@@ -209,7 +209,10 @@ private slots:
 
     void resizeStack( int w, int h ) {
         if( !isFullScreen() && !isMaximized() )
-            resize( size() - stackCentralW->size() + QSize( w, h ) );
+            if( i_visualmode == 1 ) resize( w, h ); /* Oh yes, it shouldn't
+                                   be possible that size() - stackCentralW->size() < 0
+                                   since stackCentralW is contained in the QMW... */
+            else resize( size() - stackCentralW->size() + QSize( w, h ) );
         debug(); }