Don't hardcode project display ratio for timeline thumbs

parent 6b8820e9
Pipeline #13362 passed with stage
in 13 minutes and 43 seconds
......@@ -9,7 +9,7 @@ Row {
anchors.fill: parent
visible: !isAudio
opacity: clipStatus == ClipState.Disabled ? 0.2 : 1
property int thumbWidth: container.height * 16.0/9.0
property int thumbWidth: container.height * root.dar
property bool enableCache: clipRoot.itemType == ProducerType.Video || clipRoot.itemType == ProducerType.AV
function reload() {
......
......@@ -257,6 +257,7 @@ Rectangle {
property bool seekingFinished : proxy.seekFinished
property int scrollMin: scrollView.flickableItem.contentX / timeline.scaleFactor
property int scrollMax: scrollMin + scrollView.viewport.width / timeline.scaleFactor
property double dar: 16/9
onSeekingFinishedChanged : {
playhead.opacity = seekingFinished ? 1 : 0.5
......
......@@ -139,6 +139,7 @@ void TimelineWidget::setModel(const std::shared_ptr<TimelineItemModel> &model, M
connect(rootObject(), SIGNAL(zoomOut(bool)), pCore->window(), SLOT(slotZoomOut(bool)));
connect(rootObject(), SIGNAL(processingDrag(bool)), pCore->window(), SIGNAL(enableUndo(bool)));
connect(m_proxy, &TimelineController::seeked, proxy, &MonitorProxy::setPosition);
rootObject()->setProperty("dar", pCore->getCurrentDar());
m_proxy->setRoot(rootObject());
setVisible(true);
loading = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment