Merge pull request #1568 from badosu/master

Fix muted track not highlighted on selection
This commit is contained in:
Tres Finocchiaro
2015-01-07 16:24:38 -05:00
4 changed files with 25 additions and 11 deletions

View File

@@ -259,11 +259,16 @@ void AutomationPatternView::paintEvent( QPaintEvent * )
QLinearGradient lingrad( 0, 0, 0, height() );
QColor c;
if( !( m_pat->getTrack()->isMuted() || m_pat->isMuted() ) )
c = isSelected() ? QColor( 0, 0, 224 )
: styleColor;
c = styleColor;
else
c = QColor( 80,80,80 );
c = QColor( 80, 80, 80 );
if( isSelected() == true )
{
c = QColor( qMax( c.red() - 128, 0 ), qMax( c.green() - 128, 0 ), 255 );
}
lingrad.setColorAt( 1, c.darker( 300 ) );
lingrad.setColorAt( 0, c );

View File

@@ -215,7 +215,7 @@ void BBTCOView::paintEvent( QPaintEvent * )
{
QPainter p( this );
QColor col = m_bbTCO->m_useStyleColor
QColor col = m_bbTCO->m_useStyleColor
? p.pen().brush().color()
: m_bbTCO->colorObj();
@@ -223,10 +223,10 @@ void BBTCOView::paintEvent( QPaintEvent * )
{
col = QColor( 160, 160, 160 );
}
if( isSelected() == true )
{
col = QColor( qMax( col.red() - 128, 0 ),
qMax( col.green() - 128, 0 ), 255 );
col = QColor( qMax( col.red() - 128, 0 ), qMax( col.green() - 128, 0 ), 255 );
}
QLinearGradient lingrad( 0, 0, 0, height() );

View File

@@ -907,11 +907,15 @@ void PatternView::paintEvent( QPaintEvent * )
if(( m_pat->m_patternType != Pattern::BeatPattern ) &&
!( m_pat->getTrack()->isMuted() || m_pat->isMuted() ))
c = isSelected() ? QColor( 0, 0, 224 )
: styleColor;
c = styleColor;
else
c = QColor( 80, 80, 80 );
if( isSelected() == true )
{
c = QColor( qMax( c.red() - 128, 0 ), qMax( c.green() - 128, 0 ), 255 );
}
if( m_pat->m_patternType != Pattern::BeatPattern )
{
lingrad.setColorAt( 1, c.darker( 300 ) );

View File

@@ -340,9 +340,14 @@ void SampleTCOView::paintEvent( QPaintEvent * _pe )
QColor c;
if( !( m_tco->getTrack()->isMuted() || m_tco->isMuted() ) )
c = isSelected() ? QColor( 0, 0, 224 )
: styleColor;
else c = QColor( 80, 80, 80 );
c = styleColor;
else
c = QColor( 80, 80, 80 );
if( isSelected() == true )
{
c = QColor( qMax( c.red() - 128, 0 ), qMax( c.green() - 128, 0 ), 255 );
}
QLinearGradient grad( 0, 0, 0, height() );