From 17f1856c841d8bf16d2963d1e3f46ea86f07ccdb Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Tue, 18 Jul 2017 22:11:25 +0200 Subject: [PATCH] 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. --- src/core/Track.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/Track.cpp b/src/core/Track.cpp index ed0637a16..f39abb0cc 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -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.