[apps] Factorize scrolling speed for long repetition

Change-Id: I5fcfaf04e418942664641c4b1cd044cda7f5aebb
This commit is contained in:
Hugo Saint-Vignes
2020-06-09 17:42:49 +02:00
committed by Émilie Feral
parent 241a217f58
commit b60c67ff88
16 changed files with 23 additions and 24 deletions

View File

@@ -28,7 +28,7 @@ bool SimpleInteractiveCurveViewController::textFieldDidReceiveEvent(TextField *
bool SimpleInteractiveCurveViewController::handleLeftRightEvent(Ion::Events::Event event) {
int direction = event == Ion::Events::Left ? -1 : 1;
if (moveCursorHorizontally(direction, Ion::Events::isLongRepetition())) {
if (moveCursorHorizontally(direction, Ion::Events::longRepetitionScrollSpeed())) {
interactiveCurveViewRange()->panToMakePointVisible(
m_cursor->x(), m_cursor->y(),
cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio