Make the text shadows twice as dark.

Fixed for: KDE 4.4 RC2
BUG: 223055

svn path=/trunk/KDE/kdebase/apps/; revision=1077296
This commit is contained in:
Fredrik Höglund 2010-01-19 22:11:26 +00:00
parent 997ee31955
commit fa1343bd64

View file

@ -441,6 +441,13 @@ void AbstractItemView::drawTextLayout(QPainter *painter, const QTextLayout &layo
// Draw shadow
QImage shadow = pixmap.toImage();
Plasma::PaintUtils::shadowBlur(shadow, 2, Qt::black);
// Make the shadow twice as dark
quint32 * const pixels = reinterpret_cast<quint32*>(shadow.bits());
for (int i = 0; i < shadow.width() * shadow.height(); i++) {
pixels[i] = qMin(255, qAlpha(pixels[i]) * 2) << 24;
}
painter->drawImage(rect.topLeft() + QPoint(1, 1), shadow);
}
}