[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

@@ -2,6 +2,7 @@
#include "text_field_delegate_app.h"
#include "../constant.h"
#include "../apps_container.h"
#include "poincare_helpers.h"
#include <assert.h>
using namespace Poincare;
@@ -118,7 +119,7 @@ Button * ValuesController::buttonAtIndex(int index, ButtonRowController::Positio
}
void ValuesController::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) {
willDisplayCellAtLocationWithDisplayMode(cell, i, j, PrintFloat::Mode::Default);
willDisplayCellAtLocationWithDisplayMode(cell, i, j, Preferences::sharedPreferences()->displayMode());
if (cellAtLocationIsEditable(i, j)) {
return;
}
@@ -138,7 +139,7 @@ void ValuesController::willDisplayCellAtLocation(HighlightCell * cell, int i, in
// The cell is a value cell
EvenOddBufferTextCell * myValueCell = (EvenOddBufferTextCell *)cell;
double x = m_interval->element(j-1);
PrintFloat::convertFloatToText<double>(evaluationOfAbscissaAtColumn(x, i), buffer, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits);
PoincareHelpers::ConvertFloatToText<double>(evaluationOfAbscissaAtColumn(x, i), buffer, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits);
myValueCell->setText(buffer);
}
}