]> git.sesse.net Git - kdenlive/blobdiff - src/kthumb.cpp
Fix forcing some clip properties not always working correctly
[kdenlive] / src / kthumb.cpp
index 128b45060cb82945ae2ad663a2491faf0f8fc51e..2c8ac9b7cfbe628d00b6088334e9e089ec456d5d 100644 (file)
@@ -108,13 +108,13 @@ QPixmap KThumb::getImage(KUrl url, int width, int height)
 void KThumb::extractImage(QList <int>frames)
 {
     if (!KdenliveSettings::videothumbnails() || m_producer == NULL) return;
-    m_clipManager->requestThumbs(m_id, frames);
+    m_clipManager->slotRequestThumbs(m_id, frames);
 }
 
 
 void KThumb::getThumb(int frame)
 {
-    const int theight = KdenliveSettings::trackheight();
+    const int theight = Kdenlive::DefaultThumbHeight;
     const int swidth = (int)(theight * m_ratio + 0.5);
     const int dwidth = (int)(theight * m_dar + 0.5);
     QImage img = getProducerFrame(frame, swidth, dwidth, theight);
@@ -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