Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paint a black rectangle under patterns to prevent glitches #3759

Merged
merged 1 commit into from
Aug 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/themes/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -615,12 +615,12 @@ TrackContainerView QLabel

/* common pattern colors */
TrackContentObjectView {
qproperty-mutedColor: rgb(255,255,255,100);
qproperty-mutedColor: rgba(255,255,255,100);
qproperty-mutedBackgroundColor: #373d48;
qproperty-selectedColor: #006B65;
qproperty-BBPatternBackground: #373d48;
qproperty-textColor: #fff;
qproperty-textShadowColor: rgb(0,0,0,200);
qproperty-textShadowColor: rgba(0,0,0,200);
qproperty-gradient: false; /* boolean property, set true to have a gradient */
}

Expand Down
10 changes: 4 additions & 6 deletions src/gui/AutomationPatternView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ void AutomationPatternView::paintEvent( QPaintEvent * )

lingrad.setColorAt( 1, c.darker( 300 ) );
lingrad.setColorAt( 0, c );


// paint a black rectangle under the pattern to prevent glitches with transparent backgrounds
p.fillRect( rect(), QColor( 0, 0, 0 ) );

if( gradient() )
{
p.fillRect( rect(), lingrad );
Expand Down Expand Up @@ -492,8 +495,3 @@ void AutomationPatternView::scaleTimemapToFit( float oldMin, float oldMax )

m_pat->generateTangents();
}





5 changes: 4 additions & 1 deletion src/tracks/BBTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ void BBTCOView::paintEvent( QPaintEvent * )

lingrad.setColorAt( 0, c.light( 130 ) );
lingrad.setColorAt( 1, c.light( 70 ) );


// paint a black rectangle under the pattern to prevent glitches with transparent backgrounds
p.fillRect( rect(), QColor( 0, 0, 0 ) );

if( gradient() )
{
p.fillRect( rect(), lingrad );
Expand Down
3 changes: 3 additions & 0 deletions src/tracks/Pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,9 @@ void PatternView::paintEvent( QPaintEvent * )
lingrad.setColorAt( beatPattern ? 0 : 1, c.darker( 300 ) );
lingrad.setColorAt( beatPattern ? 1 : 0, c );

// paint a black rectangle under the pattern to prevent glitches with transparent backgrounds
p.fillRect( rect(), QColor( 0, 0, 0 ) );

if( gradient() )
{
p.fillRect( rect(), lingrad );
Expand Down
3 changes: 3 additions & 0 deletions src/tracks/SampleTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,9 @@ void SampleTCOView::paintEvent( QPaintEvent * pe )
lingrad.setColorAt( 1, c.darker( 300 ) );
lingrad.setColorAt( 0, c );

// paint a black rectangle under the pattern to prevent glitches with transparent backgrounds
p.fillRect( rect(), QColor( 0, 0, 0 ) );

if( gradient() )
{
p.fillRect( rect(), lingrad );
Expand Down