]> git.sesse.net Git - vlc/commitdiff
Qt4 : fullscreen Button activation/deactivation
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 20 Aug 2007 09:39:46 +0000 (09:39 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 20 Aug 2007 09:39:46 +0000 (09:39 +0000)
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/main_interface.cpp

index 71f8db736f73b6ffb5d528fa85e01854b7598d48..017af56cd6b29d12846c5b114a499e624a19b595 100644 (file)
@@ -377,18 +377,19 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i ) :
      * Might need to be inside a frame to avoid a few resizing pb
      * FIXME
      */
+    /** Fullscreen/Visualisation **/
+    fullscreenButton = new QPushButton( "F" );
+    BUTTON_SET_ACT( fullscreenButton, "F", qtr( "Fullscreen" ), fullscreen() );
+    fullscreenButton->setMaximumSize( QSize( 26, 26 ) );
+    controlLayout->addWidget( fullscreenButton, 3, 11 );
+
     /** Playlist Button **/
     playlistButton = new QPushButton;
     playlistButton->setMaximumSize( QSize( 26, 26 ) );
+    playlistButton->setIconSize( QSize( 20, 20 ) );
 
     controlLayout->addWidget( playlistButton, 3, 10 );
 
-    /** Fullscreen/Visualisation **/
-    QPushButton *fullscreenButton = new QPushButton( "F" );
-    BUTTON_SET_ACT( fullscreenButton, "F", qtr( "Fullscreen" ), fullscreen() );
-    fullscreenButton->setMaximumSize( QSize( 26, 26 ) );
-    controlLayout->addWidget( fullscreenButton, 3, 11 );
-
     /** extended Settings **/
     QPushButton *extSettingsButton = new QPushButton( "F" );
     BUTTON_SET_ACT( extSettingsButton, "Ex", qtr( "Extended Settings" ),
@@ -559,6 +560,13 @@ void ControlsWidget::enableInput( bool enable )
     fasterButton->setEnabled( enable );
 }
 
+void ControlsWidget::enableVideo( bool enable )
+{
+    // TODO Later make the fullscreenButton toggle Visualisation and so on.
+    fullscreenButton->setEnabled( enable );
+}
+
+
 /**********************************************************************
  * Playlist Widget. The embedded playlist
  **********************************************************************/
index 30cb740c740488823bea4c8a74112bbbf6daf8d4..4cd40ba6c6d14c180c5f4fd2c84064fb4ca99df7 100644 (file)
@@ -133,6 +133,7 @@ public:
     QSlider *volumeSlider;
     void setStatus( int );
     void enableInput( bool );
+    void enableVideo( bool );
 public slots:
     void setNavigation( int );
     void updateOnTimer();
@@ -145,7 +146,7 @@ private:
     QGridLayout *controlLayout;
     InputSlider         *slider;
     QPushButton *prevSectionButton, *nextSectionButton, *menuButton;
-    QPushButton *playButton;
+    QPushButton *playButton, *fullscreenButton;
     QPushButton *slowerButton, *fasterButton;
 private slots:
     void play();
index 5d87bebe469efa1a64a7a7c500c4229aa2179665..4e1c433ee3fd4119caf93f1d3e04604cfe29a6ec 100644 (file)
@@ -889,6 +889,7 @@ void MainInterface::updateOnTimer()
     advControls->enableInput( THEMIM->getIM()->hasInput() );
     controls->enableInput( THEMIM->getIM()->hasInput() );
     advControls->enableVideo( THEMIM->getIM()->hasVideo() );
+    controls->enableVideo( THEMIM->getIM()->hasVideo() );
 
     if( intf_ShouldDie( p_intf ) )
     {