]> git.sesse.net Git - vlc/commitdiff
Qt: fix switching to minimalView behaviour
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 7 Apr 2010 13:02:42 +0000 (15:02 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 7 Apr 2010 13:02:42 +0000 (15:02 +0200)
Especially when playlist is opened.

modules/gui/qt4/main_interface.cpp

index 13c4555715d8485ba6bf9f04c38ac8bb55c7bec6..b3b1b5275fa37591f0eb953e89f9e8ccfb01a2f7 100644 (file)
@@ -734,22 +734,13 @@ void MainInterface::dockPlaylist( bool p_docked )
 void MainInterface::toggleMinimalView( bool b_switch )
 {
     if( i_visualmode == 0 )
-    { /* NORMAL MODE then */
-        if( !videoWidget || stackCentralW->currentWidget() != videoWidget )
-        {
-            showBg();
-        }
-        else
+    {
+        if( stackCentralW->currentWidget() == bgWidget )
         {
-            /* If video is visible, then toggle the status of bgWidget */
-            //FIXME
-            //bgWasVisible = !bgWasVisible;
-            /* if( stackCentralOldState == BACK G_TAB )
-                stackCentralOldState = HID DEN_TAB;
-            else
-                stackCentralOldState = BACK G_TAB;
-
-                */
+            if( stackCentralW->height() < 16 )
+            {
+                resizeStack( stackCentralW->width(), 100 );
+            }
         }
     }
 
@@ -1055,17 +1046,6 @@ void MainInterface::dragLeaveEvent(QDragLeaveEvent *event)
  ************************************************************************/
 void MainInterface::customEvent( QEvent *event )
 {
-#if 0
-    if( event->type() == PLDockEvent_Type )
-    {
-        PlaylistDialog::killInstance();
-        playlistEmbeddedFlag = true;
-        menuBar()->clear();
-        QVLCMenu::createMenuBar(this, p_intf, true, visualSelectorEnabled);
-        togglePlaylist();
-    }
-#endif
-    /*else */
     if ( event->type() == (int)SetVideoOnTopEvent_Type )
     {
         SetVideoOnTopQtEvent* p_event = (SetVideoOnTopQtEvent*)event;