[poincare] Clean Expression and Layout builders

Before: Opposite(Opposite(Rational(1))) misleadingly created the
expression "-1"; now, Opposite::Builder(Opposite::Builder(Rational(1)))
creates "--1"
This commit is contained in:
Émilie Feral
2019-01-28 17:44:08 +01:00
committed by LeaNumworks
parent b3d15d7e7f
commit ac6f23684d
113 changed files with 779 additions and 743 deletions

View File

@@ -75,7 +75,7 @@ SolutionsController::SolutionsController(Responder * parentResponder, EquationSt
m_delta2Layout(),
m_contentView(this)
{
m_delta2Layout = HorizontalLayout(VerticalOffsetLayout(CharLayout('2', KDFont::SmallFont), VerticalOffsetLayoutNode::Type::Superscript), LayoutHelper::String("-4ac", 4, KDFont::SmallFont));
m_delta2Layout = HorizontalLayout::Builder(VerticalOffsetLayout::Builder(CharLayout('2', KDFont::SmallFont), VerticalOffsetLayoutNode::Type::Superscript), LayoutHelper::String("-4ac", 4, KDFont::SmallFont));
char deltaB[] = {Ion::Charset::CapitalDelta, '=', 'b'};
static_cast<HorizontalLayout&>(m_delta2Layout).addOrMergeChildAtIndex(LayoutHelper::String(deltaB, 3, KDFont::SmallFont), 0, false);
for (int i = 0; i < EquationStore::k_maxNumberOfExactSolutions; i++) {