"fix" pixels getting cut off for some people

svn path=/trunk/KDE/kdelibs/; revision=902719
This commit is contained in:
Aaron J. Seigo 2008-12-29 00:59:22 +00:00
parent e193aaa46e
commit acc16d69ab

View File

@ -68,7 +68,13 @@ QPixmap shadowText(QString text, const QFont &font, QColor textColor, QColor sha
QPainter p(&textPixmap);
p.setPen(textColor);
p.setFont(font);
p.drawText(textPixmap.rect(), Qt::AlignLeft, text);
// FIXME: the center alignment here is odd: the rect should be the size needed by
// the text, but for some fonts and configurations this is off by a pixel or so
// and "centering" the text painting 'fixes' that. Need to research why
// this is the case and determine if we should be painting it differently here,
// doing soething different with the boundingRect call or if it's a problem
// in Qt itself
p.drawText(textPixmap.rect(), Qt::AlignCenter, text);
p.end();
//Draw blurred shadow