From ecd6cb29f1849df1475f5af29dc53fc0754d00e4 Mon Sep 17 00:00:00 2001 From: Ruben Dashyan Date: Tue, 1 Oct 2019 13:55:03 +0200 Subject: [PATCH] [escher/expression_field] Rename k_textFieldHeight to k_minimalHeight That constant has nothing to do with TextField. It is the minimal height of ExpressionField. --- escher/include/escher/expression_field.h | 2 +- escher/src/expression_field.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/escher/include/escher/expression_field.h b/escher/include/escher/expression_field.h index 0c4c1dc43..f072c3791 100644 --- a/escher/include/escher/expression_field.h +++ b/escher/include/escher/expression_field.h @@ -39,7 +39,7 @@ public: private: static constexpr int k_textFieldBufferSize = TextField::maxBufferSize(); - static constexpr KDCoordinate k_textFieldHeight = 37; + static constexpr KDCoordinate k_minimalHeight = 37; static constexpr KDCoordinate k_horizontalMargin = 5; static constexpr KDCoordinate k_verticalMargin = 5; constexpr static KDCoordinate k_separatorThickness = Metric::CellSeparatorThickness; diff --git a/escher/src/expression_field.cpp b/escher/src/expression_field.cpp index 129893c13..c9c87a32d 100644 --- a/escher/src/expression_field.cpp +++ b/escher/src/expression_field.cpp @@ -113,9 +113,9 @@ bool ExpressionField::handleEventWithText(const char * text, bool indentation, b KDCoordinate ExpressionField::inputViewHeight() const { return k_separatorThickness - + (editionIsInTextField() ? k_textFieldHeight : + + (editionIsInTextField() ? k_minimalHeight : minCoordinate(maximalHeight(), - maxCoordinate(k_textFieldHeight, m_layoutField.minimalSizeForOptimalDisplay().height()))); + maxCoordinate(k_minimalHeight, m_layoutField.minimalSizeForOptimalDisplay().height()))); } KDCoordinate ExpressionField::maximalHeight() const {