Skip to content

Commit

Permalink
Add back the rendering of text shadows for pattern labels
Browse files Browse the repository at this point in the history
Add back the rendering of text shadows for pattern labels. If some
design does not want shadows beneath the text it's always possible to
set the CSS property qproperty-textShadowColor to something completely
transparent.
  • Loading branch information
michaelgregorius committed Jul 18, 2017
1 parent 581fb3a commit 8228936
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/Track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,11 @@ void TrackContentObjectView::paintTextLabel(QString const & text, QPainter & pai

painter.fillRect(QRect(0, 0, width(), fontMetrics.height() + 2 * textTop), textBackgroundColor());

int const finalTextTop = textTop + fontMetrics.ascent();
painter.setPen(textShadowColor());
painter.drawText( textLeft + 1, finalTextTop + 1, elidedPatternName );
painter.setPen( textColor() );
painter.drawText( textLeft, textTop + fontMetrics.ascent(), elidedPatternName );
painter.drawText( textLeft, finalTextTop, elidedPatternName );
}

/*! \brief Handle a mouse press on this trackContentObjectView.
Expand Down

0 comments on commit 8228936

Please sign in to comment.