From 9eca40ca38bfdf29e008beb398061a7ae5d21170 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 9 Feb 2011 18:16:48 +0100 Subject: [PATCH] contentsRect must be bigger we draw the text at 1,1 --- paintutils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paintutils.cpp b/paintutils.cpp index 0859e655a..b1d2ec5aa 100644 --- a/paintutils.cpp +++ b/paintutils.cpp @@ -107,7 +107,8 @@ QPixmap shadowText(QString text, const QFont &font, QColor textColor, QColor sha QPixmap texturedText(const QString &text, const QFont &font, Plasma::Svg *texture) { QFontMetrics fm(font); - QRect contentsRect = fm.boundingRect(text); + //the text will be moved a bit from contentsRect + QRect contentsRect = fm.boundingRect(text).adjusted(0, 0, 2, 2); contentsRect.moveTo(0,0); QPixmap pixmap(contentsRect.size());