Skip to content
Snippets Groups Projects
Commit 1d7a34b7 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

rm stretch

parent d60710a5
No related branches found
No related tags found
1 merge request!2218Add widgets to SampleForm with no stretch (#866)
Pipeline #122928 passed
......@@ -100,10 +100,10 @@ SampleForm::SampleForm(SampleItem* sampleItem, SampleEditorController* ec)
summary->addTitleAction(showInRealspaceAction);
for (auto* layer : sampleItem->layerItems()) {
m_layout->addWidget(new AddLayerWidget(this, layer, m_ec));
m_layout->addWidget(new LayerForm(this, layer, m_ec));
m_layout->addWidget(new AddLayerWidget(this, layer, m_ec), 0, Qt::AlignTop);
m_layout->addWidget(new LayerForm(this, layer, m_ec), 0, Qt::AlignTop);
}
m_layout->addWidget(new AddLayerWidget(this, nullptr, m_ec));
m_layout->addWidget(new AddLayerWidget(this, nullptr, m_ec), 0, Qt::AlignTop);
m_layout->setSizeConstraint(QLayout::SetMinimumSize);
}
......@@ -113,10 +113,10 @@ void SampleForm::onLayerAdded(LayerItem* layerItem)
const int rowInLayout = rowInMultiLayer * 2 + 1;
m_layout->insertWidget(rowInLayout, new LayerForm(this, layerItem, m_ec));
m_layout->insertWidget(rowInLayout, new LayerForm(this, layerItem, m_ec), 0, Qt::AlignTop);
// same row => button is above!
m_layout->insertWidget(rowInLayout, new AddLayerWidget(this, layerItem, m_ec));
m_layout->insertWidget(rowInLayout, new AddLayerWidget(this, layerItem, m_ec), 0, Qt::AlignTop);
}
void SampleForm::onLayerMoved(LayerItem* layerItem)
......@@ -144,10 +144,10 @@ void SampleForm::onLayerMoved(LayerItem* layerItem)
const int rowInMultiLayer = m_sampleItem->layerItems().indexOf(layerItem);
const int rowInLayout = rowInMultiLayer * 2 + 1;
m_layout->insertWidget(rowInLayout, wl);
m_layout->insertWidget(rowInLayout, wl, 0, Qt::AlignTop);
// same row => button is above!
m_layout->insertWidget(rowInLayout, al);
m_layout->insertWidget(rowInLayout, al, 0, Qt::AlignTop);
}
void SampleForm::onAboutToRemoveLayer(LayerItem* layerItem)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment