From 4b9e4f71cd0281df0bbb742326fdbdc480701888 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 22 Nov 2009 12:49:58 +0000 Subject: [PATCH] workaround to the random gibberish when fading: use an intermediate pixmap also when opacity() < 1 svn path=/trunk/KDE/kdelibs/; revision=1052747 --- widgets/label.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widgets/label.cpp b/widgets/label.cpp index c1bc26592..f34d7bbd3 100644 --- a/widgets/label.cpp +++ b/widgets/label.cpp @@ -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;