diff --git a/app/dialog/export/exportadvancedvideodialog.cpp b/app/dialog/export/exportadvancedvideodialog.cpp index 9e38969fb..71143b50b 100644 --- a/app/dialog/export/exportadvancedvideodialog.cpp +++ b/app/dialog/export/exportadvancedvideodialog.cpp @@ -48,6 +48,7 @@ ExportAdvancedVideoDialog::ExportAdvancedVideoDialog(const QList &pix_f thread_slider_ = new IntegerSlider(); thread_slider_->SetMinimum(0); thread_slider_->SetDefaultValue(0); + thread_slider_->InsertLabelSubstitution(0, tr("Auto")); performance_layout->addWidget(thread_slider_, row, 1); row++; diff --git a/app/dialog/export/exportvideotab.cpp b/app/dialog/export/exportvideotab.cpp index f8908cea3..e4ec88b33 100644 --- a/app/dialog/export/exportvideotab.cpp +++ b/app/dialog/export/exportvideotab.cpp @@ -251,7 +251,6 @@ void ExportVideoTab::VideoCodecChanged() } else { pix_fmt_.clear(); } - qDebug() << "Set default pix fmt" << pix_fmt_; } void ExportVideoTab::SetTime(const rational &time) diff --git a/app/widget/slider/base/sliderbase.cpp b/app/widget/slider/base/sliderbase.cpp index 116a61c71..7ca14d1f0 100644 --- a/app/widget/slider/base/sliderbase.cpp +++ b/app/widget/slider/base/sliderbase.cpp @@ -104,7 +104,17 @@ void SliderBase::changeEvent(QEvent *e) void SliderBase::UpdateLabel() { - label_->setText(tristate_ ? tr("---") : GetFormattedValueToString()); + QString s; + + if (tristate_) { + s = tr("---"); + } else if (label_substitutions_.contains(GetValueInternal())) { + s = label_substitutions_.value(GetValueInternal()); + } else { + s = GetFormattedValueToString(); + } + + label_->setText(s); } QVariant SliderBase::AdjustValue(const QVariant &value) const diff --git a/app/widget/slider/base/sliderbase.h b/app/widget/slider/base/sliderbase.h index 2643ca674..64d4ed2f4 100644 --- a/app/widget/slider/base/sliderbase.h +++ b/app/widget/slider/base/sliderbase.h @@ -49,6 +49,12 @@ public: QString GetFormattedValueToString(const QVariant& v) const; + void InsertLabelSubstitution(const QVariant &value, const QString &label) + { + label_substitutions_.insert(value, label); + UpdateLabel(); + } + public slots: void ShowEditor(); @@ -92,6 +98,8 @@ private: bool format_plural_; + QMap label_substitutions_; + private slots: void LineEditConfirmed();