From f68ec6a28d2df7842761fd820f540afee49f57cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Mon, 6 Jan 2020 16:14:46 +0100 Subject: [PATCH] [apps] VariableBoxController: fix the maximal number of displayed cells --- apps/variable_box_controller.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/variable_box_controller.h b/apps/variable_box_controller.h index 4de438c33..95824e29d 100644 --- a/apps/variable_box_controller.h +++ b/apps/variable_box_controller.h @@ -33,7 +33,7 @@ public: }; void lockDeleteEvent(Page page) { m_lockPageDelete = page; } private: - constexpr static int k_maxNumberOfDisplayedRows = (Ion::Display::Height - Metric::TitleBarHeight - Metric::PopUpTopMargin - Metric::StackTitleHeight) / Metric::ToolboxRowHeight + 1; // (240 - 18 - 50 - 20) / 40 = 3.8 and +1 to get 4 + constexpr static int k_maxNumberOfDisplayedRows = (Ion::Display::Height - Metric::TitleBarHeight - Metric::PopUpTopMargin - Metric::StackTitleHeight) / Metric::ToolboxRowHeight + 2; // (240 - 18 - 50 - 20) / 40 = 3.8; the 0.8 cell can be above and below so we add +2 to get 5 constexpr static int k_numberOfMenuRows = 2; constexpr static KDCoordinate k_leafMargin = 20; ExpressionTableCellWithExpression * leafCellAtIndex(int index) override;