mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 00:41:23 +00:00
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:
parent
997ee31955
commit
fa1343bd64
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue