]> git.sesse.net Git - kdenlive/commitdiff
nicer thumbnail for externally modified clips
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 20 May 2010 14:07:54 +0000 (14:07 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 20 May 2010 14:07:54 +0000 (14:07 +0000)
svn path=/trunk/kdenlive/; revision=4460

src/projectlist.cpp

index 5fb48f090eb8a31478e86ee0f5616378f1430aef..58e4819ef424de3f5fbb1ce953a4fa665bb61edd 100644 (file)
@@ -399,7 +399,14 @@ void ProjectList::slotModifiedClip(const QString &id)
 {
     ProjectItem *item = getItemById(id);
     if (item) {
-        item->setData(0, Qt::DecorationRole,  KIcon("view-refresh").pixmap(m_listView->iconSize()));
+        QPixmap pixmap = qVariantValue<QPixmap>(item->data(0, Qt::DecorationRole));
+        if (!pixmap.isNull()) {
+            QPainter p(&pixmap);
+            p.fillRect(0, 0, pixmap.width(), pixmap.height(), QColor(255, 255, 255, 200));
+            p.drawPixmap(0, 0, KIcon("view-refresh").pixmap(m_listView->iconSize()));
+            p.end();
+        } else pixmap = KIcon("view-refresh").pixmap(m_listView->iconSize());
+        item->setData(0, Qt::DecorationRole, pixmap);
     }
 }