mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-20 01:08:15 +01:00
[apps/calculation] Fetch the edition mode in the preferences.
Change-Id: Iec7cfc5695907b8c410077a48749fd43efb6cc65
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#include "edit_expression_controller.h"
|
||||
#include "../apps_container.h"
|
||||
#include "ion/display.h"
|
||||
#include "app.h"
|
||||
#include "../apps_container.h"
|
||||
#include <ion/display.h>
|
||||
#include <poincare/preferences.h>
|
||||
#include <assert.h>
|
||||
|
||||
using namespace Shared;
|
||||
@@ -65,6 +66,10 @@ void EditExpressionController::ContentView::drawRect(KDContext * ctx, KDRect rec
|
||||
}
|
||||
}
|
||||
|
||||
bool EditExpressionController::ContentView::editionIsInTextField() const {
|
||||
return Poincare::Preferences::sharedPreferences()->editionMode() == Poincare::Preferences::EditionMode::Edition1D;
|
||||
}
|
||||
|
||||
KDCoordinate EditExpressionController::ContentView::inputViewHeight() const {
|
||||
return k_verticalMargin + (editionIsInTextField() ? k_textFieldHeight : editableExpressionViewHeight());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user