[poincare] Layout: add TODOs

This commit is contained in:
Émilie Feral
2019-08-20 14:13:08 +02:00
parent 4aa380516a
commit 246b545683
2 changed files with 2 additions and 0 deletions

View File

@@ -286,6 +286,7 @@ void Layout::collapseSiblings(LayoutCursor * cursor) {
Layout rootLayout = root();
if (node()->shouldCollapseSiblingsOnRight()) {
Layout absorbingChild = childAtIndex(rightCollapsingAbsorbingChildIndex());
// TODO: add a horizontal layout only if several siblings.
if (absorbingChild.type() != LayoutNode::Type::HorizontalLayout) {
Layout horRef = HorizontalLayout::Builder();
replaceChild(absorbingChild, horRef, cursor, true);

View File

@@ -95,6 +95,7 @@ void LayoutCursor::addEmptyMatrixLayout() {
}
void LayoutCursor::addEmptySquareRootLayout() {
// TODO: add a horizontal layout only if several children
HorizontalLayout child1 = HorizontalLayout::Builder(EmptyLayout::Builder());
NthRootLayout newChild = NthRootLayout::Builder(child1);
m_layout.addSibling(this, newChild, false);