[apps] Enable to specialize the sum layout in Sum Graph Controller

This commit is contained in:
Émilie Feral
2018-01-10 15:59:08 +01:00
committed by EmilieNumworks
parent e5032b8c30
commit ac6c8379ed
6 changed files with 24 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
#include "term_sum_controller.h"
#include "../../shared/text_field_delegate.h"
#include "../../../poincare/src/layout/baseline_relative_layout.h"
#include "../../../poincare/src/layout/string_layout.h"
#include "../app.h"
#include <assert.h>
@@ -43,4 +45,8 @@ double TermSumController::cursorNextStep(double x, int direction) {
return std::round(m_cursor->x()+delta);
}
ExpressionLayout * TermSumController::createFunctionLayout(const char * functionName) {
return new BaselineRelativeLayout(new StringLayout(functionName, 1, KDText::FontSize::Small), new StringLayout("n", 1, KDText::FontSize::Small), BaselineRelativeLayout::Type::Subscript);
}
}