Merge pull request #1568 from badosu/master
Fix muted track not highlighted on selection
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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() );
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
@@ -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() );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user