mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/calculation] Improve edit expression rendering
Change-Id: I972d9cf6fd018799966bd8765c6ee35be07aab10
This commit is contained in:
@@ -25,10 +25,14 @@ View * EditExpressionController::ContentView::subviewAtIndex(int index) {
|
||||
}
|
||||
|
||||
void EditExpressionController::ContentView::layoutSubviews() {
|
||||
KDRect mainViewFrame(0, 0, bounds().width(), bounds().height() - k_textFieldHeight);
|
||||
KDRect mainViewFrame(0, 0, bounds().width(), bounds().height() - k_textFieldHeight-k_separatorThickness);
|
||||
m_mainView->setFrame(mainViewFrame);
|
||||
KDRect inputViewFram(0, bounds().height() - k_textFieldHeight, bounds().width(), k_textFieldHeight);
|
||||
m_textField.setFrame(inputViewFram);
|
||||
KDRect inputViewFrame(0, bounds().height() - k_textFieldHeight, bounds().width(), k_textFieldHeight);
|
||||
m_textField.setFrame(inputViewFrame);
|
||||
}
|
||||
|
||||
void EditExpressionController::ContentView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
ctx->fillRect(KDRect(0, bounds().height() -k_textFieldHeight-k_separatorThickness, bounds().width(), k_separatorThickness), Palette::GreyMiddle);
|
||||
}
|
||||
|
||||
TextField * EditExpressionController::ContentView::textField() {
|
||||
|
||||
@@ -29,8 +29,10 @@ private:
|
||||
void layoutSubviews() override;
|
||||
TextField * textField();
|
||||
TableView * mainView();
|
||||
void drawRect(KDContext * ctx, KDRect rect) const override;
|
||||
private:
|
||||
static constexpr KDCoordinate k_textFieldHeight = 20;
|
||||
static constexpr KDCoordinate k_textFieldHeight = 37;
|
||||
constexpr static int k_separatorThickness = 1;
|
||||
TableView * m_mainView;
|
||||
TextField m_textField;
|
||||
char m_textBody[255];
|
||||
|
||||
Reference in New Issue
Block a user