From bb551f7c0068b42c8e5bd1d3bb3e25a41224f3db Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 4 Feb 2011 22:28:29 +0100 Subject: [PATCH] use a svg for the shadow too --- paintutils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paintutils.cpp b/paintutils.cpp index 13581bb57..02db81264 100644 --- a/paintutils.cpp +++ b/paintutils.cpp @@ -119,7 +119,7 @@ QPixmap texturedText(const QString &text, const QFont &font, Plasma::Svg *textur buffPainter.setFont(font); buffPainter.drawText(contentsRect, Qt::AlignCenter, text); buffPainter.setCompositionMode(QPainter::CompositionMode_SourceIn); - texture->paint(&buffPainter, contentsRect); + texture->paint(&buffPainter, contentsRect, "foreground"); buffPainter.end(); //do the shadow @@ -128,9 +128,11 @@ QPixmap texturedText(const QString &text, const QFont &font, Plasma::Svg *textur buffPainter.begin(&image); buffPainter.setFont(font); buffPainter.drawText(contentsRect, Qt::AlignCenter, text); + buffPainter.setCompositionMode(QPainter::CompositionMode_SourceIn); + texture->paint(&buffPainter, contentsRect, "shadow"); buffPainter.end(); - Plasma::PaintUtils::shadowBlur(image, 1, Qt::black); + expblur<16, 7>(image, 1); //hole in the shadow buffPainter.begin(&image); buffPainter.setCompositionMode(QPainter::CompositionMode_DestinationOut);