mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher/expression_field] Replace maximalHeight() by k_maximalHeight
To harmonize with k_minimalHeight
This commit is contained in:
committed by
Léa Saviot
parent
b832a9e9f4
commit
3bc3532358
@@ -40,11 +40,11 @@ public:
|
||||
private:
|
||||
static constexpr int k_textFieldBufferSize = TextField::maxBufferSize();
|
||||
static constexpr KDCoordinate k_minimalHeight = 37;
|
||||
static constexpr KDCoordinate k_maximalHeight = 0.6*Ion::Display::Height;
|
||||
static constexpr KDCoordinate k_horizontalMargin = 5;
|
||||
static constexpr KDCoordinate k_verticalMargin = 5;
|
||||
constexpr static KDCoordinate k_separatorThickness = Metric::CellSeparatorThickness;
|
||||
KDCoordinate inputViewHeight() const;
|
||||
KDCoordinate maximalHeight() const;
|
||||
TextField m_textField;
|
||||
LayoutField m_layoutField;
|
||||
};
|
||||
|
||||
@@ -100,7 +100,7 @@ bool ExpressionField::isEmpty() const {
|
||||
}
|
||||
|
||||
bool ExpressionField::heightIsMaximal() const {
|
||||
return inputViewHeight() == k_separatorThickness + maximalHeight();
|
||||
return inputViewHeight() == k_separatorThickness + k_maximalHeight;
|
||||
}
|
||||
|
||||
bool ExpressionField::handleEventWithText(const char * text, bool indentation, bool forceCursorRightOfText) {
|
||||
@@ -114,10 +114,6 @@ bool ExpressionField::handleEventWithText(const char * text, bool indentation, b
|
||||
KDCoordinate ExpressionField::inputViewHeight() const {
|
||||
return k_separatorThickness
|
||||
+ (editionIsInTextField() ? k_minimalHeight :
|
||||
minCoordinate(maximalHeight(),
|
||||
minCoordinate(k_maximalHeight,
|
||||
maxCoordinate(k_minimalHeight, m_layoutField.minimalSizeForOptimalDisplay().height())));
|
||||
}
|
||||
|
||||
KDCoordinate ExpressionField::maximalHeight() const {
|
||||
return 0.6*Ion::Display::Height;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user