cancel button for controller-connection-dialog. Draw automation pattern correctly for negative values
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1197 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -3,6 +3,13 @@
|
||||
* plugins/sf2_player/sf2_player.cpp:
|
||||
Initialize gain at 1.0
|
||||
|
||||
* src/core/automation_pattern.cpp:
|
||||
Correctly draw automation TCO for negative minValues.
|
||||
|
||||
* src/gui/controller_connection_dialog.cpp:
|
||||
- Connect cancel button
|
||||
- Make mapping function read-only for alpha release
|
||||
|
||||
2008-06-28 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* plugins/Makefile.am:
|
||||
|
||||
@@ -621,7 +621,14 @@ void automationPatternView::paintEvent( QPaintEvent * )
|
||||
height() - 2 * TCO_BORDER_WIDTH );
|
||||
}
|
||||
|
||||
const float y_scale = m_pat->firstObject()->maxValue<float>();
|
||||
const float y_scale = m_pat->firstObject()->maxValue<float>() -
|
||||
m_pat->firstObject()->minValue<float>();
|
||||
const float h = ( height()-2*TCO_BORDER_WIDTH ) /
|
||||
y_scale;
|
||||
|
||||
p.translate( 0.0f, m_pat->firstObject()->maxValue<float>() *
|
||||
height() / y_scale );
|
||||
p.scale( 1.0f, -h );
|
||||
|
||||
for( automationPattern::timeMap::const_iterator it =
|
||||
m_pat->getTimeMap().begin();
|
||||
@@ -638,12 +645,11 @@ void automationPatternView::paintEvent( QPaintEvent * )
|
||||
{
|
||||
x2 = width() - TCO_BORDER_WIDTH + 1;
|
||||
}
|
||||
const float h = ( height()-2*TCO_BORDER_WIDTH ) * it.value() /
|
||||
y_scale;
|
||||
p.fillRect( QRectF( x1, height()-TCO_BORDER_WIDTH-h, x2-x1, h ),
|
||||
p.fillRect( QRectF( x1, 0.0f, x2-x1, it.value() ),
|
||||
QColor( 255, 224, 0 ) );
|
||||
}
|
||||
|
||||
p.resetMatrix();
|
||||
p.setFont( pointSize<7>( p.font() ) );
|
||||
if( m_pat->isMuted() || m_pat->getTrack()->isMuted() )
|
||||
{
|
||||
|
||||
@@ -199,6 +199,7 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
|
||||
m_mappingFunction = new QLineEdit( m_mappingBox );
|
||||
m_mappingFunction->setGeometry( 10, 20, 170, 16 );
|
||||
m_mappingFunction->setText( "input" );
|
||||
m_mappingFunction->setReadOnly( TRUE );
|
||||
|
||||
|
||||
// Buttons
|
||||
@@ -218,8 +219,8 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
|
||||
QPushButton * cancel_btn = new QPushButton(
|
||||
embed::getIconPixmap( "cancel" ),
|
||||
tr( "Cancel" ), buttons );
|
||||
//connect( cancel_btn, SIGNAL( clicked() ),
|
||||
// this, SLOT( reject() ) );
|
||||
connect( cancel_btn, SIGNAL( clicked() ),
|
||||
this, SLOT( reject() ) );
|
||||
|
||||
resize( 256, 246 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user