]> git.sesse.net Git - vlc/commitdiff
This is an attempt to close '#1716' (zoom has to be clicked twice)
authorJean-Philippe Andre <jpeg@via.ecp.fr>
Sat, 23 Aug 2008 05:53:07 +0000 (01:53 -0400)
committerJean-Philippe Andre <jpeg@via.ecp.fr>
Sat, 23 Aug 2008 05:53:07 +0000 (01:53 -0400)
The only thing it does is re-calculating the sizeHint for MainInterface,
using videoWidget's sizeHint() instead of size().

modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp

index 7ea77b65fb5ab769f64176c7e92e54167ecda073..10f6bdcbbe088b1fb36f6c0be103302e94af54f8 100644 (file)
@@ -540,7 +540,7 @@ int MainInterface::privacyDialog( QList<ConfigControl *> *controls )
    ask _parent->isFloating()...
    If you think this would be better, please FIXME it...
 */
-#if 0
+
 QSize MainInterface::sizeHint() const
 {
     int nwidth  = controls->sizeHint().width();
@@ -559,20 +559,22 @@ QSize MainInterface::sizeHint() const
     }
     else if( videoIsActive )
     {
-        nheight += videoWidget->size().height();
-        nwidth  = videoWidget->size().width();
+        nheight += videoWidget->sizeHint().height();
+        nwidth  = videoWidget->sizeHint().width();
         msg_Dbg( p_intf, "2 %i %i", nheight, nwidth );
     }
-/*    if( !dockPL->isFloating() && dockPL->isVisible() && dockPL->widget()  )
+#if 0
+    if( !dockPL->isFloating() && dockPL->isVisible() && dockPL->widget()  )
     {
         nheight += dockPL->size().height();
         nwidth = __MAX( nwidth, dockPL->size().width() );
         msg_Dbg( p_intf, "3 %i %i", nheight, nwidth );
-    }*/
+    }
+#endif
     msg_Dbg( p_intf, "4 %i %i", nheight, nwidth );
     return QSize( nwidth, nheight );
 }
-#endif
+
 #if 0
 /* FIXME This is dead code and need to be removed AT THE END */
 void MainInterface::resizeEvent( QResizeEvent *e )
index a0037775afc91a95991030a4dcdc995ccf2f067b..a819ed008f6f6c1afc65e9de66cf2c5d1524af38 100644 (file)
@@ -83,9 +83,8 @@ public:
     QMenu *getSysTrayMenu() { return systrayMenu; };
     int getControlsVisibilityStatus();
 
-#if 0    /* Sizehint() */
+    /* Sizehint() */
     QSize sizeHint() const;
-#endif
 protected:
 //    void resizeEvent( QResizeEvent * );
     void dropEvent( QDropEvent *);