Commit 88aa00e4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: use a spin box rather than a slider if there is no min/max

parent c652287c
...@@ -757,6 +757,7 @@ void ExtV4l2::Refresh( void ) ...@@ -757,6 +757,7 @@ void ExtV4l2::Refresh( void )
hlayout->addWidget( combobox ); hlayout->addWidget( combobox );
} }
else else
if( (i_type & VLC_VAR_HASMIN) && (i_type & VLC_VAR_HASMAX) )
{ {
QSlider *slider = new QSlider( box ); QSlider *slider = new QSlider( box );
slider->setObjectName( qfu( psz_var ) ); slider->setObjectName( qfu( psz_var ) );
...@@ -777,6 +778,17 @@ void ExtV4l2::Refresh( void ) ...@@ -777,6 +778,17 @@ void ExtV4l2::Refresh( void )
ValueChange( int ) ); ValueChange( int ) );
hlayout->addWidget( slider ); hlayout->addWidget( slider );
} }
else
{
QSpinBox *spinBox = new QSpinBox( box );
spinBox->setObjectName( qfu( psz_var ) );
spinBox->setMinimum( INT_MIN );
spinBox->setMaximum( INT_MAX );
spinBox->setValue( i_val );
CONNECT( spinBox, valueChanged( int ), this,
ValueChange( int ) );
hlayout->addWidget( spinBox );
}
layout->addLayout( hlayout ); layout->addLayout( hlayout );
break; break;
} }
......
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