Adjustment of AudioSndio

Adjust the layout that's created in AudioSndio::setupWidget::setupWidget
by using a QFormLayout.

This was done in a "blind" fashion as I am not able to compile this
code. Adjustments are very similar to the ones done in
AudioPulseAudio::setupWidget::setupWidget with commit b53290344b
though.
This commit is contained in:
Michael Gregorius
2023-07-25 18:15:37 +02:00
parent 9282e6c91b
commit a429c2f94f
2 changed files with 5 additions and 9 deletions

View File

@@ -28,7 +28,7 @@
#ifdef LMMS_HAVE_SNDIO
#include <cstdlib>
#include <QLabel>
#include <QFormLayout>
#include <QLineEdit>
#include "endian_handling.h"
@@ -183,12 +183,10 @@ void AudioSndio::run()
AudioSndio::setupWidget::setupWidget( QWidget * _parent ) :
AudioDeviceSetupWidget( AudioSndio::name(), _parent )
{
m_device = new QLineEdit( "", this );
m_device->setGeometry( 10, 20, 160, 20 );
QFormLayout * form = new QFormLayout(this);
QLabel * dev_lbl = new QLabel( tr( "Device" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
m_device = new QLineEdit( "", this );
form->addRow(tr("Device"), m_device);
gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ );
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
@@ -198,9 +196,8 @@ AudioSndio::setupWidget::setupWidget( QWidget * _parent ) :
m_channels = new gui::LcdSpinBox( 1, this );
m_channels->setModel( m );
m_channels->setLabel( tr( "Channels" ) );
m_channels->move( 180, 20 );
form->addRow(tr("Channels"), m_channels);
}

View File

@@ -506,7 +506,6 @@ SetupDialog::SetupDialog(ConfigTabs tab_to_open) :
new AudioOss::setupWidget(as_w);
#endif
// TODO !!!
#ifdef LMMS_HAVE_SNDIO
m_audioIfaceSetupWidgets[AudioSndio::name()] =
new AudioSndio::setupWidget(as_w);