* Fix for Icons and comboboxes mismatch in arpeggiator in Instrument Editor #5494 (https://github.com/LMMS/lmms/issues/5494) Introduce a static const int variable for the default height of a ComboBox. Set this height already in the constructor of the ComboBox object. Update all modules setting the height of a ComboBox object to make use of the new constant. * Replace 'const int' by 'constexpr int' after review.
This commit is contained in:
@@ -75,12 +75,12 @@ DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls )
|
||||
ToolTip::add( enabled2Toggle, tr( "Enable/disable filter 2" ) );
|
||||
|
||||
ComboBox * m_filter1ComboBox = new ComboBox( this );
|
||||
m_filter1ComboBox->setGeometry( 19, 70, 137, 22 );
|
||||
m_filter1ComboBox->setGeometry( 19, 70, 137, ComboBox::DEFAULT_HEIGHT );
|
||||
m_filter1ComboBox->setFont( pointSize<8>( m_filter1ComboBox->font() ) );
|
||||
m_filter1ComboBox->setModel( &controls->m_filter1Model );
|
||||
|
||||
ComboBox * m_filter2ComboBox = new ComboBox( this );
|
||||
m_filter2ComboBox->setGeometry( 217, 70, 137, 22 );
|
||||
m_filter2ComboBox->setGeometry( 217, 70, 137, ComboBox::DEFAULT_HEIGHT );
|
||||
m_filter2ComboBox->setFont( pointSize<8>( m_filter2ComboBox->font() ) );
|
||||
m_filter2ComboBox->setModel( &controls->m_filter2Model );
|
||||
}
|
||||
|
||||
@@ -151,8 +151,8 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
|
||||
ComboBox *freqRangeCombo = new ComboBox(this, tr("Frequency range"));
|
||||
freqRangeCombo->setToolTip(tr("Frequency range"));
|
||||
freqRangeCombo->setMinimumSize(100, 22);
|
||||
freqRangeCombo->setMaximumSize(200, 22);
|
||||
freqRangeCombo->setMinimumSize(100, ComboBox::DEFAULT_HEIGHT);
|
||||
freqRangeCombo->setMaximumSize(200, ComboBox::DEFAULT_HEIGHT);
|
||||
freqRangeCombo->setModel(&controls->m_freqRangeModel);
|
||||
config_layout->addWidget(freqRangeCombo, 0, 3, 2, 1);
|
||||
|
||||
@@ -171,8 +171,8 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
|
||||
ComboBox *ampRangeCombo = new ComboBox(this, tr("Amplitude range"));
|
||||
ampRangeCombo->setToolTip(tr("Amplitude range"));
|
||||
ampRangeCombo->setMinimumSize(100, 22);
|
||||
ampRangeCombo->setMaximumSize(200, 22);
|
||||
ampRangeCombo->setMinimumSize(100, ComboBox::DEFAULT_HEIGHT);
|
||||
ampRangeCombo->setMaximumSize(200, ComboBox::DEFAULT_HEIGHT);
|
||||
ampRangeCombo->setModel(&controls->m_ampRangeModel);
|
||||
config_layout->addWidget(ampRangeCombo, 2, 3, 2, 1);
|
||||
|
||||
@@ -201,8 +201,8 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
|
||||
ComboBox *windowCombo = new ComboBox(this, tr("FFT window type"));
|
||||
windowCombo->setToolTip(tr("FFT window type"));
|
||||
windowCombo->setMinimumSize(100, 22);
|
||||
windowCombo->setMaximumSize(200, 22);
|
||||
windowCombo->setMinimumSize(100, ComboBox::DEFAULT_HEIGHT);
|
||||
windowCombo->setMaximumSize(200, ComboBox::DEFAULT_HEIGHT);
|
||||
windowCombo->setModel(&controls->m_windowModel);
|
||||
config_layout->addWidget(windowCombo, 2, 5, 2, 1);
|
||||
processor->rebuildWindow();
|
||||
|
||||
@@ -541,7 +541,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
|
||||
// interpolation selector
|
||||
m_interpBox = new ComboBox( this );
|
||||
m_interpBox->setGeometry( 142, 62, 82, 22 );
|
||||
m_interpBox->setGeometry( 142, 62, 82, ComboBox::DEFAULT_HEIGHT );
|
||||
m_interpBox->setFont( pointSize<8>( m_interpBox->font() ) );
|
||||
|
||||
// wavegraph
|
||||
|
||||
@@ -1664,7 +1664,7 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent )
|
||||
m_osc2VolKnob -> setVolumeKnob( true );
|
||||
|
||||
m_osc2WaveBox = new ComboBox( view );
|
||||
m_osc2WaveBox -> setGeometry( 204, O2ROW + 7, 42, 22 );
|
||||
m_osc2WaveBox -> setGeometry( 204, O2ROW + 7, 42, ComboBox::DEFAULT_HEIGHT );
|
||||
m_osc2WaveBox->setFont( pointSize<8>( m_osc2WaveBox->font() ) );
|
||||
|
||||
maketinyled( m_osc2SyncHButton, 212, O2ROW - 3, tr( "Hard sync oscillator 2" ) )
|
||||
@@ -1679,18 +1679,18 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent )
|
||||
m_osc3VolKnob -> setVolumeKnob( true );
|
||||
|
||||
m_osc3Wave1Box = new ComboBox( view );
|
||||
m_osc3Wave1Box -> setGeometry( 160, O3ROW + 7, 42, 22 );
|
||||
m_osc3Wave1Box -> setGeometry( 160, O3ROW + 7, 42, ComboBox::DEFAULT_HEIGHT );
|
||||
m_osc3Wave1Box->setFont( pointSize<8>( m_osc3Wave1Box->font() ) );
|
||||
|
||||
m_osc3Wave2Box = new ComboBox( view );
|
||||
m_osc3Wave2Box -> setGeometry( 204, O3ROW + 7, 42, 22 );
|
||||
m_osc3Wave2Box -> setGeometry( 204, O3ROW + 7, 42, ComboBox::DEFAULT_HEIGHT );
|
||||
m_osc3Wave2Box->setFont( pointSize<8>( m_osc3Wave2Box->font() ) );
|
||||
|
||||
maketinyled( m_osc3SyncHButton, 212, O3ROW - 3, tr( "Hard sync oscillator 3" ) )
|
||||
maketinyled( m_osc3SyncRButton, 191, O3ROW - 3, tr( "Reverse sync oscillator 3" ) )
|
||||
|
||||
m_lfo1WaveBox = new ComboBox( view );
|
||||
m_lfo1WaveBox -> setGeometry( 2, LFOROW + 7, 42, 22 );
|
||||
m_lfo1WaveBox -> setGeometry( 2, LFOROW + 7, 42, ComboBox::DEFAULT_HEIGHT );
|
||||
m_lfo1WaveBox->setFont( pointSize<8>( m_lfo1WaveBox->font() ) );
|
||||
|
||||
maketsknob( m_lfo1AttKnob, LFOCOL1, LFOROW, tr( "Attack" ), " ms", "lfoKnob" )
|
||||
@@ -1698,7 +1698,7 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent )
|
||||
makeknob( m_lfo1PhsKnob, LFOCOL3, LFOROW, tr( "Phase" ), tr( " deg" ), "lfoKnob" )
|
||||
|
||||
m_lfo2WaveBox = new ComboBox( view );
|
||||
m_lfo2WaveBox -> setGeometry( 127, LFOROW + 7, 42, 22 );
|
||||
m_lfo2WaveBox -> setGeometry( 127, LFOROW + 7, 42, ComboBox::DEFAULT_HEIGHT );
|
||||
m_lfo2WaveBox->setFont( pointSize<8>( m_lfo2WaveBox->font() ) );
|
||||
|
||||
maketsknob( m_lfo2AttKnob, LFOCOL4, LFOROW, tr( "Attack" ), " ms", "lfoKnob" )
|
||||
|
||||
@@ -403,7 +403,7 @@ malletsInstrumentView::malletsInstrumentView( malletsInstrument * _instrument,
|
||||
changePreset(); // Show widget
|
||||
|
||||
m_presetsCombo = new ComboBox( this, tr( "Instrument" ) );
|
||||
m_presetsCombo->setGeometry( 140, 50, 99, 22 );
|
||||
m_presetsCombo->setGeometry( 140, 50, 99, ComboBox::DEFAULT_HEIGHT );
|
||||
m_presetsCombo->setFont( pointSize<8>( m_presetsCombo->font() ) );
|
||||
|
||||
connect( &_instrument->m_presetsModel, SIGNAL( dataChanged() ),
|
||||
|
||||
Reference in New Issue
Block a user