[apps/escher] Harmonize Toolbox and VariableBoxController row heights.

Change-Id: I8e6c5543d46480a1129f3812ca40c29e4407eac1
This commit is contained in:
Léa Saviot
2017-11-24 16:36:58 +01:00
parent e6b4d07cb6
commit a78bd0db88
7 changed files with 9 additions and 12 deletions

View File

@@ -1,5 +1,6 @@
#include "variable_box_controller.h"
#include "constant.h"
#include <escher/metric.h>
#include <assert.h>
using namespace Poincare;
@@ -163,11 +164,8 @@ void VariableBoxController::ContentViewController::willDisplayCellForIndex(Highl
}
KDCoordinate VariableBoxController::ContentViewController::rowHeight(int index) {
if (m_currentPage == Page::RootMenu) {
return k_nodeRowHeight;
}
if (m_currentPage == Page::Scalar) {
return k_leafRowHeight;
if (m_currentPage == Page::RootMenu || m_currentPage == Page::Scalar) {
return Metric::ToolboxRowHeight;
}
const Expression * expression = expressionForIndex(index);
if (expression) {
@@ -176,7 +174,7 @@ KDCoordinate VariableBoxController::ContentViewController::rowHeight(int index)
delete layout;
return expressionHeight+k_leafMargin;
}
return k_leafRowHeight;
return Metric::ToolboxRowHeight;
}
KDCoordinate VariableBoxController::ContentViewController::cumulatedHeightFromIndex(int j) {