workaround to the random gibberish when fading:

use an intermediate pixmap also when opacity() < 1

svn path=/trunk/KDE/kdelibs/; revision=1052747
This commit is contained in:
Marco Martin 2009-11-22 12:49:58 +00:00
parent 902afd3f0a
commit 4b9e4f71cd

View File

@ -255,7 +255,8 @@ void Label::paint(QPainter *painter,
QLabel *native = nativeWidget();
QFontMetrics fm = native->font();
if (native->wordWrap() || native->text().isEmpty() || size().width() >= fm.width(native->text())) {
//FIXME: using QGraphicsProxyWidget::paint directly with opacity<1 produces uninitialized random gibberish
if (qFuzzyCompare((qreal)1.0, opacity()) && (native->wordWrap() || native->text().isEmpty() || size().width() >= fm.width(native->text()))) {
QGraphicsProxyWidget::paint(painter, option, widget);
} else {
const int gradientLength = 25;