]> git.sesse.net Git - vlc/commitdiff
Qt4 - Small interface and control layout fix.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 16 Dec 2007 00:09:01 +0000 (00:09 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 16 Dec 2007 00:09:01 +0000 (00:09 +0000)
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/main_interface.cpp

index 8eaa7ad483eefb4b7101db0e1a671d496fec878f..f9fe06a84c6082016d70c727565759fab1833549 100644 (file)
@@ -371,7 +371,9 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
 {
     controlLayout = new QGridLayout( this );
     controlLayout->setSpacing( 0 );
-    setSizePolicy( QSizePolicy::Preferred , QSizePolicy::Minimum );
+    //controlLayout->setMargin( 0 );
+
+    setSizePolicy( QSizePolicy::Preferred , QSizePolicy::Maximum );
 
     /** The main Slider **/
     slider = new InputSlider( Qt::Horizontal, NULL );
@@ -456,8 +458,8 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
     /* Play */
     playButton = new QPushButton;
     playButton->setSizePolicy( sizePolicy );
-    playButton->setMaximumSize( QSize( 38, 38 ) );
-    playButton->setMinimumSize( QSize( 45, 45 ) );
+    playButton->setMaximumSize( QSize( 36, 36 ) );
+    playButton->setMinimumSize( QSize( 36, 36 ) );
     playButton->setIconSize( QSize( 30, 30 ) );
 
     controlLayout->addWidget( playButton, 2, 0, 2, 2 );
@@ -499,8 +501,10 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
     BUTTON_SET_ACT_I( nextButton, "", next.png, qtr( "Next" ), next() );
     BUTTON_SET_ACT_I( stopButton, "", stop.png, qtr( "Stop" ), stop() );
 
-    controlLayout->setColumnStretch( 7 , 2 );
-
+    controlLayout->setColumnMinimumWidth( 7, 20 );
+    controlLayout->setColumnStretch( 7, 0 );
+    controlLayout->setColumnStretch( 8, 0 );
+    controlLayout->setColumnStretch( 9, 0 );
     /*
      * Other first Line buttons
      */
@@ -524,6 +528,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
     setupSmallButton( extSettingsButton );
     controlLayout->addWidget( extSettingsButton, 3, 12, Qt::AlignBottom );
 
+    controlLayout->setColumnStretch( 13, 0 );
     controlLayout->setColumnStretch( 14, 5 );
 
     /* Volume */
@@ -562,8 +567,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
 }
 
 ControlsWidget::~ControlsWidget()
-{
-}
+{}
 
 /*
 QSize ControlsWidget::sizeHint() const
index 8c8243cd0bc5e3e59b9ba60b07e48e0076d1c715..4f64d38364f2b4e5e43b9dc45c80e364e98821e9 100644 (file)
@@ -352,6 +352,7 @@ void MainInterface::handleMainUi( QSettings *settings )
 
     /* Margins, spacing */
     main->setContentsMargins( 0, 0, 0, 0 );
+    main->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum );
     mainLayout->setMargin( 0 );
 
     /* Create the CONTROLS Widget */