Fix EffectRackView appearance (GUI). (#5766)
* Fix EffectRackView appearance (GUI). * Elide the name of the effect when it tends to be too big. (#5752) * Evenly space the controls (W/D, Decay Gate). (#5750) * Show the scrollbar in the default theme to close the gap. (#5752) * Reduce the gap between the effect and the scrollbar. (#5757) * Use always the same width for the EffectRackview (InstrumentTrack and SampleTrack) to avoid gaps or cutoffs of the background. * Widen the background in the default theme. * Widen the embossed space in the background in the classic theme to fit the controls. * Changes for improving the EffectRackView after reviews. * Reduce the background for the default theme by 1 pixel. * Reduce the background for the classic theme by 2 pixels and remove the darker line at the bottom right. * Reduce the width of long names of the plugin also by 2 pixels. * Put the controls 2 pixels closer to each other.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 443 B |
@@ -297,6 +297,12 @@ QScrollBar::handle:horizontal:disabled, QScrollBar::handle:vertical:disabled {
|
||||
border: none;
|
||||
}
|
||||
|
||||
EffectRackView QScrollBar::handle:vertical:disabled {
|
||||
background: #3f4750;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* arrow buttons */
|
||||
|
||||
QScrollBar::add-line, QScrollBar::sub-line {
|
||||
@@ -349,6 +355,8 @@ QScrollBar::left-arrow:horizontal:disabled { background-image: url(resources:sba
|
||||
QScrollBar::right-arrow:horizontal:disabled { background-image: url(resources:sbarrow_right_d.png);}
|
||||
QScrollBar::up-arrow:vertical:disabled { background-image: url(resources:sbarrow_up_d.png);}
|
||||
QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarrow_down_d.png);}
|
||||
EffectRackView QScrollBar::up-arrow:vertical:disabled { background-image: url(resources:sbarrow_up.png);}
|
||||
EffectRackView QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarrow_down.png);}
|
||||
|
||||
/* background for song editor and bb-editor */
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
EffectRackView( EffectChain* model, QWidget* parent = NULL );
|
||||
virtual ~EffectRackView();
|
||||
|
||||
static constexpr int DEFAULT_WIDTH = 245;
|
||||
|
||||
public slots:
|
||||
void clearViews();
|
||||
|
||||
@@ -57,6 +57,7 @@ public:
|
||||
return castModel<Effect>();
|
||||
}
|
||||
|
||||
static constexpr int DEFAULT_WIDTH = 215;
|
||||
|
||||
public slots:
|
||||
void editControls();
|
||||
|
||||
@@ -319,7 +319,7 @@ FxMixerView::FxChannelView::FxChannelView(QWidget * _parent, FxMixerView * _mv,
|
||||
|
||||
// Create EffectRack for the channel
|
||||
m_rackView = new EffectRackView( &fxChannel->m_fxChain, _mv->m_racksWidget );
|
||||
m_rackView->setFixedSize( 245, FxLine::FxLineHeight );
|
||||
m_rackView->setFixedSize( EffectRackView::DEFAULT_WIDTH, FxLine::FxLineHeight );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ void EffectRackView::update()
|
||||
}
|
||||
}
|
||||
|
||||
w->setFixedSize( 210 + 2*EffectViewMargin, m_lastY );
|
||||
w->setFixedSize( EffectView::DEFAULT_WIDTH + 2*EffectViewMargin, m_lastY);
|
||||
|
||||
QWidget::update();
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
|
||||
m_subWindow( NULL ),
|
||||
m_controlView( NULL )
|
||||
{
|
||||
setFixedSize( 210, 60 );
|
||||
setFixedSize( EffectView::DEFAULT_WIDTH, 60 );
|
||||
|
||||
// Disable effects that are of type "DummyEffect"
|
||||
bool isEnabled = !dynamic_cast<DummyEffect *>( effect() );
|
||||
@@ -62,21 +62,21 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
|
||||
|
||||
m_wetDry = new Knob( knobBright_26, this );
|
||||
m_wetDry->setLabel( tr( "W/D" ) );
|
||||
m_wetDry->move( 27, 5 );
|
||||
m_wetDry->move( 40 - m_wetDry->width() / 2, 5 );
|
||||
m_wetDry->setEnabled( isEnabled );
|
||||
m_wetDry->setHintText( tr( "Wet Level:" ), "" );
|
||||
|
||||
|
||||
m_autoQuit = new TempoSyncKnob( knobBright_26, this );
|
||||
m_autoQuit->setLabel( tr( "DECAY" ) );
|
||||
m_autoQuit->move( 60, 5 );
|
||||
m_autoQuit->move( 78 - m_autoQuit->width() / 2, 5 );
|
||||
m_autoQuit->setEnabled( isEnabled && !effect()->m_autoQuitDisabled );
|
||||
m_autoQuit->setHintText( tr( "Time:" ), "ms" );
|
||||
|
||||
|
||||
m_gate = new Knob( knobBright_26, this );
|
||||
m_gate->setLabel( tr( "GATE" ) );
|
||||
m_gate->move( 93, 5 );
|
||||
m_gate->move( 116 - m_gate->width() / 2, 5 );
|
||||
m_gate->setEnabled( isEnabled && !effect()->m_autoQuitDisabled );
|
||||
m_gate->setHintText( tr( "Gate:" ), "" );
|
||||
|
||||
@@ -89,7 +89,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
|
||||
this );
|
||||
QFont f = ctls_btn->font();
|
||||
ctls_btn->setFont( pointSize<8>( f ) );
|
||||
ctls_btn->setGeometry( 140, 14, 50, 20 );
|
||||
ctls_btn->setGeometry( 150, 14, 50, 20 );
|
||||
connect( ctls_btn, SIGNAL( clicked() ),
|
||||
this, SLOT( editControls() ) );
|
||||
|
||||
@@ -219,10 +219,12 @@ void EffectView::paintEvent( QPaintEvent * )
|
||||
f.setBold( true );
|
||||
p.setFont( f );
|
||||
|
||||
QString elidedText = p.fontMetrics().elidedText( model()->displayName(), Qt::ElideRight, width() - 22 );
|
||||
|
||||
p.setPen( palette().shadow().color() );
|
||||
p.drawText( 6, 55, model()->displayName() );
|
||||
p.drawText( 6, 55, elidedText );
|
||||
p.setPen( palette().text().color() );
|
||||
p.drawText( 5, 54, model()->displayName() );
|
||||
p.drawText( 5, 54, elidedText );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1508,9 +1508,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
|
||||
m_tabWidget->addTab( m_miscView, tr( "Miscellaneous" ), "misc_tab", 5 );
|
||||
adjustTabSize(m_ssView);
|
||||
adjustTabSize(instrumentFunctions);
|
||||
adjustTabSize(m_effectView);
|
||||
// stupid bugfix, no one knows why
|
||||
m_effectView->resize(INSTRUMENT_WIDTH - 4, INSTRUMENT_HEIGHT - 4 - 1);
|
||||
m_effectView->resize(EffectRackView::DEFAULT_WIDTH, INSTRUMENT_HEIGHT - 4 - 1);
|
||||
adjustTabSize(m_midiView);
|
||||
adjustTabSize(m_miscView);
|
||||
|
||||
|
||||
@@ -1100,7 +1100,7 @@ SampleTrackWindow::SampleTrackWindow(SampleTrackView * tv) :
|
||||
generalSettingsLayout->addLayout(basicControlsLayout);
|
||||
|
||||
m_effectRack = new EffectRackView(tv->model()->audioPort()->effects());
|
||||
m_effectRack->setFixedSize(240, 242);
|
||||
m_effectRack->setFixedSize(EffectRackView::DEFAULT_WIDTH, 242);
|
||||
|
||||
vlayout->addWidget(generalSettingsWidget);
|
||||
vlayout->addWidget(m_effectRack);
|
||||
|
||||
Reference in New Issue
Block a user