From 0759da2776139c59c98f16753d6ec1664cab44e8 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Tue, 25 Jul 2023 18:28:04 +0200 Subject: [PATCH] Layout adjustments for AudioSoundIo Use a QFormLayout in AudioSoundIo::setupWidget::setupWidget. Note: Changes have been done "blindly" as I am not able to compile this code. --- src/core/audio/AudioSoundIo.cpp | 16 +++++----------- src/gui/modals/SetupDialog.cpp | 1 - 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/core/audio/AudioSoundIo.cpp b/src/core/audio/AudioSoundIo.cpp index 633808204..23385960f 100644 --- a/src/core/audio/AudioSoundIo.cpp +++ b/src/core/audio/AudioSoundIo.cpp @@ -26,7 +26,7 @@ #ifdef LMMS_HAVE_SOUNDIO -#include +#include #include #include "Engine.h" @@ -451,19 +451,13 @@ AudioSoundIo::setupWidget::setupWidget( QWidget * _parent ) : { m_setupUtil.m_setupWidget = this; - m_backend = new gui::ComboBox( this, "BACKEND" ); - m_backend->setGeometry( 64, 15, 260, 20 ); + QFormLayout * form = new QFormLayout(this); - QLabel * backend_lbl = new QLabel( tr( "Backend" ), this ); - backend_lbl->setFont( pointSize<7>( backend_lbl->font() ) ); - backend_lbl->move( 8, 18 ); + m_backend = new gui::ComboBox( this, "BACKEND" ); + form->addRow(tr("Backend"), m_backend); m_device = new gui::ComboBox( this, "DEVICE" ); - m_device->setGeometry( 64, 35, 260, 20 ); - - QLabel * dev_lbl = new QLabel( tr( "Device" ), this ); - dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) ); - dev_lbl->move( 8, 38 ); + form->addRow(tr("Device"), m_device); // Setup models m_soundio = soundio_create(); diff --git a/src/gui/modals/SetupDialog.cpp b/src/gui/modals/SetupDialog.cpp index 7da234d07..892155280 100644 --- a/src/gui/modals/SetupDialog.cpp +++ b/src/gui/modals/SetupDialog.cpp @@ -490,7 +490,6 @@ SetupDialog::SetupDialog(ConfigTabs tab_to_open) : new AudioPortAudio::setupWidget(as_w); #endif -// TODO !!! #ifdef LMMS_HAVE_SOUNDIO m_audioIfaceSetupWidgets[AudioSoundIo::name()] = new AudioSoundIo::setupWidget(as_w);