Commit 41e0bd59 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: ControlsWidget: fix layout visibility

parent 8290233b
...@@ -109,7 +109,7 @@ void AbstractController::setupButton( QAbstractButton *aButton ) ...@@ -109,7 +109,7 @@ void AbstractController::setupButton( QAbstractButton *aButton )
/* Open the generic config line for the toolbar, parse it /* Open the generic config line for the toolbar, parse it
* and create the widgets accordingly */ * and create the widgets accordingly */
void AbstractController::parseAndCreate( const QString& config, void AbstractController::parseAndCreate( const QString& config,
QBoxLayout *controlLayout ) QBoxLayout *newControlLayout )
{ {
QStringList list = config.split( ";", QString::SkipEmptyParts ) ; QStringList list = config.split( ";", QString::SkipEmptyParts ) ;
for( int i = 0; i < list.count(); i++ ) for( int i = 0; i < list.count(); i++ )
...@@ -140,12 +140,12 @@ void AbstractController::parseAndCreate( const QString& config, ...@@ -140,12 +140,12 @@ void AbstractController::parseAndCreate( const QString& config,
} }
} }
createAndAddWidget( controlLayout, -1, i_type, i_option ); createAndAddWidget( newControlLayout, -1, i_type, i_option );
} }
if( buttonGroupLayout ) if( buttonGroupLayout )
{ {
controlLayout->addLayout( buttonGroupLayout ); newControlLayout->addLayout( buttonGroupLayout );
buttonGroupLayout = NULL; buttonGroupLayout = NULL;
} }
} }
...@@ -648,7 +648,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, ...@@ -648,7 +648,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
setStyleSheet( "background: red "); setStyleSheet( "background: red ");
#endif #endif
setAttribute( Qt::WA_MacBrushedMetal); setAttribute( Qt::WA_MacBrushedMetal);
QVBoxLayout *controlLayout = new QVBoxLayout( this ); controlLayout = new QVBoxLayout( this );
controlLayout->setContentsMargins( 3, 1, 0, 1 ); controlLayout->setContentsMargins( 3, 1, 0, 1 );
controlLayout->setSpacing( 0 ); controlLayout->setSpacing( 0 );
QHBoxLayout *controlLayout1 = new QHBoxLayout; QHBoxLayout *controlLayout1 = new QHBoxLayout;
......
...@@ -46,8 +46,9 @@ class QPixmap; ...@@ -46,8 +46,9 @@ class QPixmap;
class QLabel; class QLabel;
class QGridLayout; class QGridLayout;
class QHBoxLayout;
class QBoxLayout; class QBoxLayout;
class QHBoxLayout;
class QVBoxLayout;
class QAbstractSlider; class QAbstractSlider;
class QAbstractButton; class QAbstractButton;
...@@ -165,7 +166,7 @@ protected: ...@@ -165,7 +166,7 @@ protected:
intf_thread_t *p_intf; intf_thread_t *p_intf;
QSignalMapper *toolbarActionsMapper; QSignalMapper *toolbarActionsMapper;
QHBoxLayout *controlLayout; QBoxLayout *controlLayout;
/* Change to BoxLayout if both dir are needed */ /* Change to BoxLayout if both dir are needed */
AdvControlsWidget *advControls; AdvControlsWidget *advControls;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment