if (props.contains("colorspace"))
new QTreeWidgetItem(m_view.clip_vproperties, QStringList() << i18n("Colorspace") << ProfilesDialog::getColorspaceDescription(props.value("colorspace").toInt()));
-
- int width = 180.0 * KdenliveSettings::project_display_ratio();
- if (width % 2 == 1) width++;
- QPixmap pix = m_clip->thumbProducer()->getImage(url, m_clip->getClipThumbFrame(), width, 180);
- QPixmap framedPix(pix.width(), pix.height());
- framedPix.fill(Qt::transparent);
- QPainter p(&framedPix);
- p.setRenderHint(QPainter::Antialiasing, true);
- QPainterPath path;
- path.addRoundedRect(0.5, 0.5, framedPix.width() - 1, framedPix.height() - 1, 4, 4);
- p.setClipPath(path);
- p.drawPixmap(0, 0, pix);
- p.end();
-
- m_view.clip_thumb->setPixmap(framedPix);
+ m_view.clip_thumb->setMinimumSize(180 * KdenliveSettings::project_display_ratio(), 180);
+
if (t == IMAGE || t == VIDEO || t == PLAYLIST) m_view.tabWidget->removeTab(AUDIOTAB);
} else {
m_view.tabWidget->removeTab(IMAGETAB);
if (del2) delete del2;
}
+void ClipProperties::slotGotThumbnail(const QString &id, QImage img)
+{
+ if (id != m_clip->getId()) return;
+ QPixmap framedPix(img.width(), img.height());
+ framedPix.fill(Qt::transparent);
+ QPainter p(&framedPix);
+ p.setRenderHint(QPainter::Antialiasing, true);
+ QPainterPath path;
+ path.addRoundedRect(0.5, 0.5, framedPix.width() - 1, framedPix.height() - 1, 4, 4);
+ p.setClipPath(path);
+ p.drawImage(0, 0, img);
+ p.end();
+ m_view.clip_thumb->setPixmap(framedPix);
+}
+
void ClipProperties::slotApplyProperties()
{
if (m_clip != NULL) {