Add back the rendering of text shadows for pattern labels

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.
This commit is contained in:
Michael Gregorius
2017-07-18 22:11:25 +02:00
parent a81b14b6cf
commit 17f1856c84

View File

@@ -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.