mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/shared] StoreController: compute cell width from the number of
glyph required to display the largest float
This commit is contained in:
committed by
LeaNumworks
parent
4d593a6149
commit
e7e4820513
@@ -45,8 +45,7 @@ public:
|
||||
void didBecomeFirstResponder() override;
|
||||
|
||||
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
|
||||
static constexpr KDCoordinate k_cellWidth = Poincare::PrintFloat::glyphLengthForFloatWithPrecision(Poincare::Preferences::LargeNumberOfSignificantDigits) * 7 + 2*Metric::CellMargin + Metric::TableSeparatorThickness; // 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;
|
||||
|
||||
Reference in New Issue
Block a user