small visual improvements to the timeline's timecode label

This commit is contained in:
itsmattkc
2019-12-08 00:24:50 +11:00
parent 00c06e3e6b
commit dd8d1e84b0
3 changed files with 12 additions and 0 deletions
@@ -24,6 +24,8 @@ TimelineWidget::TimelineWidget(QWidget *parent) :
vert_layout->addLayout(ruler_and_time_layout);
timecode_label_ = new TimeSlider();
timecode_label_->SetAlignment(Qt::AlignCenter);
timecode_label_->setVisible(false);
connect(timecode_label_, SIGNAL(ValueChanged(int64_t)), this, SIGNAL(TimeChanged(const int64_t&)));
connect(timecode_label_, SIGNAL(ValueChanged(int64_t)), this, SLOT(UpdateInternalTime(const int64_t&)));
ruler_and_time_layout->addWidget(timecode_label_);
@@ -138,6 +140,8 @@ void TimelineWidget::SetTimebase(const rational &timebase)
ruler_->SetTimebase(timebase);
timecode_label_->SetTimebase(timebase);
timecode_label_->setVisible(!timebase.isNull());
foreach (TimelineAndTrackView* view, views_) {
view->view()->SetTimebase(timebase);
}