[escher] Correct Metric

Change-Id: Iaef3b5654ba5209eadc2a9726f7206f59df73a32
This commit is contained in:
Émilie Feral
2017-05-10 17:09:22 +02:00
parent ba4cdda42d
commit a40dcc9af2
4 changed files with 7 additions and 5 deletions

View File

@@ -187,7 +187,7 @@ void AppsContainer::refreshPreferences() {
void AppsContainer::displayExamModePopUp(bool activate, bool forceWindowRedraw) {
m_examPopUpController.setActivatingExamMode(activate);
activeApp()->displayModalViewController(&m_examPopUpController, 0.f, 0.f, Metric::PopUpTopMargin, Metric::PopUpRightMargin, Metric::PopUpBottomMargin, Metric::PopUpLeftMargin);
activeApp()->displayModalViewController(&m_examPopUpController, 0.f, 0.f, Metric::ExamPopUpTopMargin, Metric::PopUpRightMargin, Metric::ExamPopUpBottomMargin, Metric::PopUpLeftMargin);
if (forceWindowRedraw) {
m_window.redraw(true);
}

View File

@@ -51,7 +51,7 @@ bool TextFieldDelegateApp::textFieldDidReceiveEvent(TextField * textField, Ion::
AppsContainer * appsContainer = (AppsContainer *)textField->app()->container();
VariableBoxController * variableBoxController = appsContainer->variableBoxController();
variableBoxController->setTextFieldCaller(textField);
textField->app()->displayModalViewController(variableBoxController, 0.f, 0.f, 50, 50, 0, 50);
textField->app()->displayModalViewController(variableBoxController, 0.f, 0.f, Metric::PopUpTopMargin, Metric::PopUpLeftMargin, 0, Metric::PopUpRightMargin);
return true;
}
if (event == Ion::Events::XNT) {

View File

@@ -16,8 +16,9 @@ public:
constexpr static KDCoordinate ScrollStep = 10;
constexpr static KDCoordinate PopUpLeftMargin = 40;
constexpr static KDCoordinate PopUpRightMargin = 40;
constexpr static KDCoordinate PopUpTopMargin = 27;
constexpr static KDCoordinate PopUpBottomMargin = 55;
constexpr static KDCoordinate ExamPopUpTopMargin = 27;
constexpr static KDCoordinate ExamPopUpBottomMargin = 55;
constexpr static KDCoordinate PopUpTopMargin = 50;
};
#endif

View File

@@ -1,6 +1,7 @@
#include <escher/responder.h>
#include <escher/app.h>
#include <escher/toolbox.h>
#include <escher/metric.h>
#include <assert.h>
Responder::Responder(Responder * parentResponder) :
@@ -19,7 +20,7 @@ void Responder::setParentResponder(Responder * responder) {
bool Responder::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::Toolbox && toolbox() != nullptr) {
toolbox()->setSender(this);
app()->displayModalViewController(toolbox(), 0.f, 0.f, 50, 50, 0, 50);
app()->displayModalViewController(toolbox(), 0.f, 0.f, Metric::PopUpTopMargin, Metric::PopUpLeftMargin, 0, Metric::PopUpRightMargin);
return true;
}
return false;