mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
[escher] Correct Metric
Change-Id: Iaef3b5654ba5209eadc2a9726f7206f59df73a32
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user