add spacer to make transition params nicer

parent ee7785fa
......@@ -58,7 +58,7 @@ void AssetPanel::showTransition(int tid, std::shared_ptr<AssetParameterModel> tr
QString transitionName = TransitionsRepository::get()->getName(transitionId);
m_assetTitle->setText(i18n("Properties of transition %1", transitionName));
m_transitionWidget->setVisible(true);
m_transitionWidget->setModel(transitionModel);
m_transitionWidget->setModel(transitionModel, true);
}
void AssetPanel::showEffectStack(int cid, const QString &clipName, std::shared_ptr<EffectStackModel> effectsModel)
......
......@@ -41,7 +41,7 @@ AssetParameterView::AssetParameterView(QWidget *parent)
setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
}
void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &model)
void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &model, bool addSpacer)
{
qDebug() << "set model " << model.get();
unsetModel();
......@@ -55,6 +55,9 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
m_lay->addWidget(w);
m_widgets.push_back(w);
}
if (addSpacer) {
m_lay->addStretch();
}
}
void AssetParameterView::resetValues()
......
......@@ -43,7 +43,7 @@ public:
AssetParameterView(QWidget *parent = nullptr);
/** Sets the model to be displayed by current view */
void setModel(const std::shared_ptr<AssetParameterModel> &model);
void setModel(const std::shared_ptr<AssetParameterModel> &model, bool addSpacer = false);
/** Set the widget to display no model (this yield ownership on the smart-ptr)*/
void unsetModel();
......
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