[poincare] change createLayout signature

- CreateLayout depends on the float display mode and the number of
significant digits
- Float display mode does not have a default value anymore
This commit is contained in:
Émilie Feral
2018-04-23 16:17:34 +02:00
parent d94ed82ab8
commit b8af15f1ab
116 changed files with 251 additions and 275 deletions

View File

@@ -1,6 +1,7 @@
#include "sum_graph_controller.h"
#include "../apps_container.h"
#include <poincare/layout_engine.h>
#include "poincare_helpers.h"
#include "../../poincare/src/layout/condensed_sum_layout.h"
#include <assert.h>
@@ -266,7 +267,7 @@ void SumGraphController::LegendView::setSumSymbol(Step step, double start, doubl
false);
ExpressionLayout * childrenLayouts[3];
strlcpy(buffer, "= ", 3);
PrintFloat::convertFloatToText<double>(result, buffer+2, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits);
PoincareHelpers::ConvertFloatToText<double>(result, buffer+2, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits);
childrenLayouts[2] = LayoutEngine::createStringLayout(buffer, strlen(buffer), KDText::FontSize::Small);
childrenLayouts[1] = functionLayout;
childrenLayouts[0] = m_sumLayout;