From b6e074e4f5371c4994b233e7a9f07931a7a08a53 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Thu, 13 Dec 2012 00:39:15 +0100 Subject: [PATCH] Fix thumbnails of transparent clips sometimes messed up --- src/kthumb.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.39.2