[poincare] Change the way Expression are built

This commit is contained in:
Émilie Feral
2019-02-18 11:37:22 +01:00
committed by LeaNumworks
parent 902dda34d6
commit 7b5f3c570d
249 changed files with 2076 additions and 1908 deletions

View File

@@ -77,18 +77,18 @@ void SequenceToolbox::buildExtraCellsLayouts(const char * sequenceName, int recu
for (int j = 0; j < recurrenceDepth; j++) {
const char * indice = j == 0 ? "n" : "n+1";
m_addedCellLayout[j] = HorizontalLayout::Builder(
CharLayout(sequenceName[0], KDFont::LargeFont),
CharLayout::Builder(sequenceName[0], KDFont::LargeFont),
VerticalOffsetLayout::Builder(LayoutHelper::String(indice, strlen(indice), KDFont::LargeFont), VerticalOffsetLayoutNode::Type::Subscript)
);
m_addedCellLayout[j+recurrenceDepth] = HorizontalLayout::Builder(
CharLayout(otherSequenceName[0], KDFont::LargeFont),
CharLayout::Builder(otherSequenceName[0], KDFont::LargeFont),
VerticalOffsetLayout::Builder(LayoutHelper::String(indice, strlen(indice), KDFont::LargeFont), VerticalOffsetLayoutNode::Type::Subscript)
);
}
if (recurrenceDepth < 2) {
const char * indice = recurrenceDepth == 0 ? "n" : (recurrenceDepth == 1 ? "n+1" : "n+2");
m_addedCellLayout[2*recurrenceDepth] = HorizontalLayout::Builder(
CharLayout(otherSequenceName[0], KDFont::LargeFont),
CharLayout::Builder(otherSequenceName[0], KDFont::LargeFont),
VerticalOffsetLayout::Builder(LayoutHelper::String(indice, strlen(indice), KDFont::LargeFont), VerticalOffsetLayoutNode::Type::Subscript)
);
}