[apps/shared] EditableCellTableViewController: adjust column width to be

able to display float like "-1.234567E-123"
This commit is contained in:
Émilie Feral
2019-09-25 10:53:44 +02:00
committed by LeaNumworks
parent 501f7ed8af
commit d6ad694b76
9 changed files with 28 additions and 40 deletions

View File

@@ -46,6 +46,8 @@ public:
protected:
static constexpr KDCoordinate k_cellWidth = 116;
static_assert((Poincare::PrintFloat::glyphLengthForFloatWithPrecision(Poincare::Preferences::LargeNumberOfSignificantDigits)) * 7 + 2*Metric::CellMargin < k_cellWidth, "Store controller cells are too small to hold values like '-1.234567E-123'"); // KDFont::SmallFont->glyphSize().width() = 7
constexpr static int k_maxNumberOfEditableCells = (Ion::Display::Width/k_cellWidth+2) * ((Ion::Display::Height - Metric::TitleBarHeight - Metric::TabHeight)/k_cellHeight+2);
constexpr static int k_numberOfTitleCells = 4;
static constexpr int k_titleCellType = 0;