[apps/graph] ValuesController: Decrease the number memoized cells by

making the cell wider
This commit is contained in:
Émilie Feral
2019-10-03 17:03:00 +02:00
committed by LeaNumworks
parent 2efbec59a1
commit d4f6f5a477
2 changed files with 3 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ public:
private:
static constexpr KDCoordinate k_abscissaCellWidth = k_cellWidth + Metric::TableSeparatorThickness;
static constexpr KDCoordinate k_parametricCellWidth = (2*Poincare::PrintFloat::glyphLengthForFloatWithPrecision(Poincare::Preferences::LargeNumberOfSignificantDigits)+3) * 7 + 2*Metric::CellMargin; // The largest cell is holding "(-1.234567E-123;-1.234567E-123)" and KDFont::SmallFont->glyphSize().width() = 7
static constexpr int k_maxNumberOfFunctions = 5;
static constexpr int k_maxNumberOfFunctions = 4;
static constexpr int k_maxNumberOfAbscissaCells = Shared::ContinuousFunction::k_numberOfPlotTypes * k_maxNumberOfRows;
static constexpr int k_maxNumberOfCells = k_maxNumberOfFunctions * k_maxNumberOfRows;

View File

@@ -43,7 +43,8 @@ public:
virtual IntervalParameterController * intervalParameterController() = 0;
protected:
static constexpr KDCoordinate k_cellWidth = (Poincare::PrintFloat::glyphLengthForFloatWithPrecision(Poincare::Preferences::LargeNumberOfSignificantDigits)) * 7 + 2*Metric::CellMargin; // KDFont::SmallFont->glyphSize().width() = 7
// The cellWidth is increased by 10 pixels to avoid displaying more than 4 columns on the screen (and thus decrease the number of memoized cell)
static constexpr KDCoordinate k_cellWidth = (Poincare::PrintFloat::glyphLengthForFloatWithPrecision(Poincare::Preferences::LargeNumberOfSignificantDigits)) * 7 + 2*Metric::CellMargin+10; // KDFont::SmallFont->glyphSize().width() = 7, we add 10 to avoid displaying more that 4 columns and decr
static constexpr int k_abscissaTitleCellType = 0;
static constexpr int k_functionTitleCellType = 1;
static constexpr int k_editableValueCellType = 2;