m_timeline = new KeyframeHelper(m_ui.frameTimeline);
layout->addWidget(m_timeline);
layout->setContentsMargins(0, 0, 0, 0);
+
+ int size = style()->pixelMetric(QStyle::PM_SmallIconSize);
+ QSize iconSize(size, size);
m_ui.buttonPrevious->setIcon(KIcon("media-skip-backward"));
m_ui.buttonPrevious->setToolTip(i18n("Go to previous keyframe"));
+ m_ui.buttonPrevious->setIconSize(iconSize);
m_ui.buttonNext->setIcon(KIcon("media-skip-forward"));
m_ui.buttonNext->setToolTip(i18n("Go to next keyframe"));
+ m_ui.buttonNext->setIconSize(iconSize);
m_ui.buttonAddDelete->setIcon(KIcon("document-new"));
m_ui.buttonAddDelete->setToolTip(i18n("Add keyframe"));
+ m_ui.buttonAddDelete->setIconSize(iconSize);
m_ui.buttonSync->setIcon(KIcon("insert-link"));
m_ui.buttonSync->setToolTip(i18n("Synchronize with timeline cursor"));
m_ui.buttonSync->setChecked(KdenliveSettings::transitionfollowcursor());
+ m_ui.buttonSync->setIconSize(iconSize);
connect(m_timeline, SIGNAL(positionChanged(int)), this, SLOT(slotPositionChanged(int)));
connect(m_timeline, SIGNAL(keyframeMoved(int)), this, SLOT(slotKeyframeMoved(int)));
{
int ix = m_extraGeometryNames.indexOf(name);
QString val = m_extraGeometries.at(ix)->serialise();
- if (!val.contains("=")) val = val.section(',', 0, 0);
+ if (!val.contains("=")) val = val.section('/', 0, 0);
else {
- QStringList list = val.split(';');
+ QStringList list = val.split(';', QString::SkipEmptyParts);
val.clear();
+ val.append(list.takeFirst().section('/', 0, 0));
foreach (const QString value, list) {
- val.append(value.section(',', 0, 0) + ';');
+ val.append(';' + value.section('/', 0, 0));
}
}
return val;
{
m_inPoint = minframe;
m_outPoint = maxframe;
+ m_scene->cleanup();
if (m_geometry)
m_geometry->parse(elem.attribute("value").toUtf8().data(), maxframe - minframe, m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
m_rect->setZValue(0);
m_scene->addItem(m_rect);
connect(m_rect, SIGNAL(changed()), this, SLOT(slotUpdateGeometry()));
-
+ m_scene->centerView();
slotPositionChanged(0, false);
slotCheckMonitorPosition(m_monitor->render->seekFramePosition());
}
geom->insert(item2);
}
}
-
emit parameterChanged();
}
void GeometryWidget::slotAdjustToFrameSize()
{
- if (m_frameSize == QPoint()) m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+ if (m_frameSize == QPoint() || m_frameSize.x() == 0 || m_frameSize.y() == 0) {
+ m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+ }
m_spinWidth->blockSignals(true);
m_spinHeight->blockSignals(true);
m_spinWidth->setValue((int) (m_frameSize.x() / m_monitor->render->sar() + 0.5));
void GeometryWidget::slotFitToWidth()
{
- if (m_frameSize == QPoint()) m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+ if (m_frameSize == QPoint() || m_frameSize.x() == 0 || m_frameSize.y() == 0) {
+ m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+ }
double factor = (double) m_monitor->render->frameRenderWidth() / m_frameSize.x() * m_monitor->render->sar();
m_spinWidth->blockSignals(true);
m_spinHeight->blockSignals(true);
void GeometryWidget::slotFitToHeight()
{
- if (m_frameSize == QPoint()) m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+ if (m_frameSize == QPoint() || m_frameSize.x() == 0 || m_frameSize.y() == 0) {
+ m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+ }
double factor = (double) m_monitor->render->renderHeight() / m_frameSize.y();
m_spinWidth->blockSignals(true);
m_spinHeight->blockSignals(true);