forked from qt-creator/qt-creator
Utils: Use a full layout row for an aspect for Columns and Forms
Avoids some boilerplate on the user code side.
This seems to be the only existing case. If there'd ever be a case where
this is not appropriate, an extra Row { ... } would solve it.
Change-Id: I1ae1102e895640c0acc03b4949e3baabecfcdc49
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -331,10 +331,13 @@ LayoutBuilder &LayoutBuilder::addRow(const LayoutItems &items)
|
||||
*/
|
||||
LayoutBuilder &LayoutBuilder::addItem(const LayoutItem &item)
|
||||
{
|
||||
if (item.aspect)
|
||||
if (item.aspect) {
|
||||
item.aspect->addToLayout(*this);
|
||||
else
|
||||
if (m_layoutType == FormLayout || m_layoutType == VBoxLayout)
|
||||
finishRow();
|
||||
} else {
|
||||
m_items.push_back(item);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user