Fix effectstack layout spacing issue introduced in recent commit

parent dd9cfe33
Pipeline #8108 passed with stage
in 23 minutes and 6 seconds
......@@ -72,11 +72,11 @@ ButtonParamWidget::ButtonParamWidget(std::shared_ptr<AssetParameterModel> model,
layout->addWidget(m_label);
m_label->setVisible(m_displayConditional);
}
//layout->setContentsMargins(0, 0, 0, 2);
//layout->setSpacing(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
m_button = new QPushButton(m_displayConditional ? m_buttonName : m_alternatebuttonName, this);
layout->addWidget(m_button);
setMinimumHeight(m_button->sizeHint().height());
setMinimumHeight(m_button->sizeHint().height() + (m_label != nullptr ? m_label->sizeHint().height() : 0));
// emit the signal of the base class when appropriate
connect(this->m_button, &QPushButton::clicked, [&, filterData, filterAddedParams]() {
......
......@@ -55,7 +55,9 @@ GeometryEditWidget::GeometryEditWidget(std::shared_ptr<AssetParameterModel> mode
m_geom = new GeometryWidget(monitor, QPair<int, int>(start, end), rect, 100, frameSize, false,
m_model->data(m_index, AssetParameterModel::OpacityRole).toBool(), true, this);
m_geom->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred));
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(m_geom);
setFixedHeight(m_geom->sizeHint().height());
// emit the signal of the base class when appropriate
connect(this->m_geom, &GeometryWidget::valueChanged, [this](const QString val) { emit valueChanged(m_index, val, true); });
......
......@@ -105,7 +105,7 @@ CollapsibleEffectView::CollapsibleEffectView(const std::shared_ptr<EffectItemMod
auto *l = static_cast<QHBoxLayout *>(frame->layout());
m_colorIcon = new QLabel(this);
l->insertWidget(0, m_colorIcon);
m_colorIcon->setFixedSize(icon.size());
m_colorIcon->setFixedSize(collapseButton->sizeHint());
title = new QLabel(this);
l->insertWidget(2, title);
......@@ -130,9 +130,10 @@ CollapsibleEffectView::CollapsibleEffectView(const std::shared_ptr<EffectItemMod
}
// Color thumb
m_colorIcon->setScaledContents(true);
m_colorIcon->setPixmap(QPixmap::fromImage(icon));
title->setText(effectName);
frame->setMinimumHeight(title->sizeHint().height());
frame->setMinimumHeight(collapseButton->sizeHint().height());
m_view = new AssetParameterView(this);
const std::shared_ptr<AssetParameterModel> effectParamModel = std::static_pointer_cast<AssetParameterModel>(effectModel);
......
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