X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmarkerdialog.cpp;h=a3935e5ad396d1d72224b465616c6caaa13f2b1b;hb=f925c183d011886e9e56224e4331ab2470ff1dd7;hp=87e3f43ae03e00327eae103bf7138afdd43e4ce6;hpb=405ebfa31dec2209eca7031b7ee781f5ca7be10d;p=kdenlive diff --git a/src/markerdialog.cpp b/src/markerdialog.cpp index 87e3f43a..a3935e5a 100644 --- a/src/markerdialog.cpp +++ b/src/markerdialog.cpp @@ -61,6 +61,7 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, cons if (width % 2 == 1) width++; QPixmap p(width, 100); QString colour = clip->getProperty("colour"); + int swidth = (int) (100.0 * m_profile->width() / m_profile->height() + 0.5); switch (m_clip->clipType()) { case VIDEO: @@ -70,7 +71,7 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, cons connect(this, SIGNAL(updateThumb()), m_previewTimer, SLOT(start())); case IMAGE: case TEXT: - p = QPixmap::fromImage(KThumb::getFrame(m_producer, m_in->getValue(), width, 100)); + p = QPixmap::fromImage(KThumb::getFrame(m_producer, m_in->getValue(), swidth, width, 100)); break; case COLOR: colour = colour.replace(0, 2, "#"); @@ -109,8 +110,9 @@ void MarkerDialog::slotUpdateThumb() m_previewTimer->stop(); int pos = m_in->getValue(); int width = 100.0 * m_dar; + int swidth = (int) (100.0 * m_profile->width() / m_profile->height() + 0.5); if (width % 2 == 1) width++; - QPixmap p = QPixmap::fromImage(KThumb::getFrame(m_producer, pos, width, 100)); + QPixmap p = QPixmap::fromImage(KThumb::getFrame(m_producer, pos, swidth, width, 100)); if (!p.isNull()) clip_thumb->setPixmap(p); else