From: Jean-Baptiste Mardelle Date: Wed, 12 Dec 2012 23:39:15 +0000 (+0100) Subject: Fix thumbnails of transparent clips sometimes messed up X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b6e074e4f5371c4994b233e7a9f07931a7a08a53;p=kdenlive Fix thumbnails of transparent clips sometimes messed up --- diff --git a/src/kthumb.cpp b/src/kthumb.cpp index 128b4506..bd102c3f 100644 --- a/src/kthumb.cpp +++ b/src/kthumb.cpp @@ -229,8 +229,14 @@ QImage KThumb::getFrame(Mlt::Frame *frame, int frameWidth, int displayWidth, int } else { image = image.scaled(displayWidth, height, Qt::IgnoreAspectRatio).rgbSwapped(); } - p.fill(QColor(100, 100, 100, 70).rgba()); +#if QT_VERSION >= 0x040800 + p.fill(QColor(100, 100, 100, 70)); QPainter painter(&p); +#else + p.fill(Qt::transparent); + QPainter painter(&p); + painter.fillRect(p.rect(), QColor(100, 100, 100, 70)); +#endif painter.drawImage(p.rect(), image); painter.end(); } else