[apps] Replace k_cursorTop/BottomMarginRatio by virtual methods

In SimpleInteractiveCurveViewController subclasses.
This commit is contained in:
Ruben Dashyan
2019-03-13 10:06:50 +01:00
committed by Émilie Feral
parent fe977bdc07
commit 5b6fca8f72
9 changed files with 15 additions and 16 deletions

View File

@@ -28,7 +28,7 @@ SumGraphController::SumGraphController(Responder * parentResponder, InputEventHa
}
void SumGraphController::viewWillAppear() {
m_graphRange->panToMakePointVisible(m_cursor->x(), m_cursor->y(), k_cursorTopMarginRatio, k_cursorRightMarginRatio, k_cursorBottomMarginRatio, k_cursorLeftMarginRatio);
m_graphRange->panToMakePointVisible(m_cursor->x(), m_cursor->y(), cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio);
m_graphView->setBannerView(&m_legendView);
m_graphView->setCursorView(&m_cursorView);
m_graphView->setOkView(nullptr);
@@ -80,7 +80,7 @@ bool SumGraphController::moveCursorHorizontallyToPosition(double x) {
m_graphView->setAreaHighlight(m_startSum, m_endSum);
}
m_legendView.setEditableZone(m_cursor->x());
m_graphRange->panToMakePointVisible(x, y, k_cursorTopMarginRatio, k_cursorRightMarginRatio, k_cursorBottomMarginRatio, k_cursorLeftMarginRatio);
m_graphRange->panToMakePointVisible(x, y, cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio);
m_graphView->reload();
return true;
}