diff --git a/ChangeLog b/ChangeLog index 18c0b1bb3..9c272efa3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,17 @@ connetions are not saved!) 2006-08-15 Danny McRae + * src/widgets/ladspa_control.cpp: + doubled the number of steps in the knobs + + * src/core/ladspa_control_dialog.cpp: + changed linking to default on + + * data/themes/default/effect_plugin.png: + * src/widgets/rack_plugin.cpp: + * src/widgets/rack_view.cpp: + added some texture to the plugin widget + * src/core/ladspa_control_dialog.cpp: save and restore the channel link state @@ -36,8 +47,6 @@ * src/core/ladspa_control_dialog.cpp: * src/core/ladspa_control.cpp: - added a link channels option to the ladspa controls - - unlinking the channels will currently break automation for all - but the first channel * All of the effects related files: reformatted to respect the 80 characters per line convention diff --git a/data/themes/default/effect_plugin.png b/data/themes/default/effect_plugin.png new file mode 100644 index 000000000..7b1d2b28a Binary files /dev/null and b/data/themes/default/effect_plugin.png differ diff --git a/src/widgets/ladspa_control.cpp b/src/widgets/ladspa_control.cpp index 9235b66f3..1ff341891 100644 --- a/src/widgets/ladspa_control.cpp +++ b/src/widgets/ladspa_control.cpp @@ -75,7 +75,7 @@ ladspaControl::ladspaControl( QWidget * _parent, m_knob->setRange( static_cast( m_port->max ), static_cast( m_port->min ), 1 + static_cast( m_port->max - - m_port->min ) / 200 ); + m_port->min ) / 400 ); m_knob->setInitValue( static_cast( m_port->def ) ); setFixedSize( m_knob->width(), m_knob->height() ); @@ -95,7 +95,7 @@ ladspaControl::ladspaControl( QWidget * _parent, m_knob->setLabel( m_port->name ); m_knob->setRange( m_port->min, m_port->max, ( m_port->max - - m_port->min ) / 200.0f ); + m_port->min ) / 400.0f ); m_knob->setInitValue( m_port->def ); m_knob->setHintText( tr( "Value:" ) + " ", "" ); #ifdef QT4 diff --git a/src/widgets/rack_plugin.cpp b/src/widgets/rack_plugin.cpp index 1769582ba..8f3269e61 100644 --- a/src/widgets/rack_plugin.cpp +++ b/src/widgets/rack_plugin.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #define addSeparator insertSeparator #define addMenu insertItem @@ -81,11 +82,17 @@ rackPlugin::rackPlugin( QWidget * _parent, m_name = m_effect->getName(); - setFixedSize( 210, 58 ); - setPaletteBackgroundColor( QColor( 99, 99, 99 ) ); - - m_grouper = new QGroupBox( 1, Qt::Vertical, "", this ); - m_grouper->setFixedSize( 210, 58 ); + setFixedSize( 210, 60 ); + + QPixmap bg = embed::getIconPixmap( "effect_plugin" ); +#ifdef QT4 + setAutoFillBackground( TRUE ); + QPalette pal; + pal.setBrush( backgroundRole(), bg ); + setPalette( pal ); +#else + setErasePixmap( bg ); +#endif m_bypass = new ledCheckBox( "", this, tr( "Turn the effect off" ), eng(), m_track ); @@ -109,7 +116,7 @@ rackPlugin::rackPlugin( QWidget * _parent, m_wetDry->setLabel( tr( "W/D" ) ); m_wetDry->setRange( 0.0f, 1.0f, 0.01f ); m_wetDry->setInitValue( 1.0f ); - m_wetDry->move( 25, 3 ); + m_wetDry->move( 27, 5 ); m_wetDry->setHintText( tr( "Wet Level:" ) + " ", "" ); #ifdef QT4 m_wetDry->setWhatsThis( @@ -127,7 +134,7 @@ rackPlugin::rackPlugin( QWidget * _parent, m_autoQuit->setLabel( tr( "Decay" ) ); m_autoQuit->setRange( 1.0f, 8000.0f, 100.0f ); m_autoQuit->setInitValue( 1 ); - m_autoQuit->move( 60, 3 ); + m_autoQuit->move( 60, 5 ); m_autoQuit->setHintText( tr( "Time:" ) + " ", "ms" ); #ifdef QT4 m_autoQuit->setWhatsThis( @@ -145,7 +152,7 @@ rackPlugin::rackPlugin( QWidget * _parent, m_gate->setLabel( tr( "Gate" ) ); m_gate->setRange( 0.0f, 1.0f, 0.01f ); m_gate->setInitValue( 0.0f ); - m_gate->move( 95, 3 ); + m_gate->move( 93, 5 ); m_gate->setHintText( tr( "Gate:" ) + " ", "" ); #ifdef QT4 m_gate->setWhatsThis( @@ -160,7 +167,7 @@ rackPlugin::rackPlugin( QWidget * _parent, m_editButton->setText( tr( "Controls" ) ); QFont f = m_editButton->font(); m_editButton->setFont( pointSize<7>( f ) ); - m_editButton->setGeometry( 140, 19, 50, 20 ); + m_editButton->setGeometry( 140, 14, 50, 20 ); connect( m_editButton, SIGNAL( clicked() ), this, SLOT( editControls() ) ); @@ -170,7 +177,18 @@ rackPlugin::rackPlugin( QWidget * _parent, f = m_label->font(); f.setBold( TRUE ); m_label->setFont( pointSize<7>( f ) ); - m_label->setGeometry( 5, 38, 200, 20 ); + m_label->setGeometry( 5, 44, 195, 10 ); + + QPixmap back = QPixmap( bg.convertToImage().copy( 5, 44, + 195, 10 ) ); +#ifdef QT4 + m_label->setAutoFillBackground( TRUE ); + QPalette pal; + pal.setBrush( backgroundRole(), back ); + m_label->setPalette( pal ); +#else + m_label->setErasePixmap( back ); +#endif m_controlView = new ladspaControlDialog( eng()->getMainWindow()->workspace(), diff --git a/src/widgets/rack_view.cpp b/src/widgets/rack_view.cpp index 72db2bc24..6b32b866b 100644 --- a/src/widgets/rack_view.cpp +++ b/src/widgets/rack_view.cpp @@ -51,11 +51,11 @@ rackView::rackView( QWidget * _parent, m_port( _port ), m_ladspa( eng()->getLADSPAManager() ) { - setFixedSize( 230, 180 ); + setFixedSize( 230, 184 ); m_mainLayout = new QVBoxLayout( this ); m_scrollView = new QScrollView( this ); - m_scrollView->setFixedSize( 230, 180 ); + m_scrollView->setFixedSize( 230, 184 ); m_scrollView->setVScrollBarMode( QScrollView::AlwaysOn ); m_mainLayout->addWidget( m_scrollView );