Adjust the MIDI setup dialog
Adjust the MIDI setup dialog: * Show it in a QGroupBox * Make it use a `QFormLayout` to layout the label and line edit. Remove the hard coded height.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
#ifndef LMMS_GUI_MIDI_SETUP_WIDGET_H
|
||||
#define LMMS_GUI_MIDI_SETUP_WIDGET_H
|
||||
|
||||
#include "TabWidget.h"
|
||||
#include <QGroupBox>
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class MidiSetupWidget : public TabWidget
|
||||
class MidiSetupWidget : public QGroupBox
|
||||
{
|
||||
Q_OBJECT
|
||||
MidiSetupWidget( const QString & caption, const QString & configSection,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "MidiSetupWidget.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QFormLayout>>
|
||||
#include <QLineEdit>
|
||||
|
||||
#include "ConfigManager.h"
|
||||
@@ -37,7 +37,7 @@ namespace lmms::gui
|
||||
|
||||
MidiSetupWidget::MidiSetupWidget(const QString & caption, const QString & configSection,
|
||||
const QString & devName, QWidget * parent) :
|
||||
TabWidget(TabWidget::tr("Settings for %1").arg(tr(caption.toUtf8())), parent),
|
||||
QGroupBox(QGroupBox::tr("Settings for %1").arg(tr(caption.toUtf8())), parent),
|
||||
m_configSection(configSection),
|
||||
m_device(nullptr)
|
||||
{
|
||||
@@ -45,12 +45,11 @@ MidiSetupWidget::MidiSetupWidget(const QString & caption, const QString & config
|
||||
// to indicate that there is no editable device field
|
||||
if (!devName.isNull())
|
||||
{
|
||||
m_device = new QLineEdit(devName, this);
|
||||
m_device->setGeometry(10, 20, 160, 20);
|
||||
QFormLayout * form = new QFormLayout(this);
|
||||
|
||||
auto dev_lbl = new QLabel(tr("Device"), this);
|
||||
dev_lbl->setFont(pointSize<7>(dev_lbl->font()));
|
||||
dev_lbl->setGeometry(10, 40, 160, 10);
|
||||
m_device = new QLineEdit(devName, this);
|
||||
|
||||
form->addRow(tr("Device"), m_device);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -617,7 +617,6 @@ SetupDialog::SetupDialog(ConfigTabs tab_to_open) :
|
||||
|
||||
// Ifaces-settings-widget.
|
||||
auto ms_w = new QWidget(midi_w);
|
||||
ms_w->setFixedHeight(60);
|
||||
|
||||
auto ms_w_layout = new QHBoxLayout(ms_w);
|
||||
ms_w_layout->setSpacing(0);
|
||||
|
||||
Reference in New Issue
Block a user