Skip to content

Commit 17f1856

Browse files
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.
1 parent a81b14b commit 17f1856

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/Track.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,11 @@ void TrackContentObjectView::paintTextLabel(QString const & text, QPainter & pai
663663

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

666+
int const finalTextTop = textTop + fontMetrics.ascent();
667+
painter.setPen(textShadowColor());
668+
painter.drawText( textLeft + 1, finalTextTop + 1, elidedPatternName );
666669
painter.setPen( textColor() );
667-
painter.drawText( textLeft, textTop + fontMetrics.ascent(), elidedPatternName );
670+
painter.drawText( textLeft, finalTextTop, elidedPatternName );
668671
}
669672

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

0 commit comments

Comments
 (0)