[apps/shared] Change Zoom button in curves

Zoom is now called navigate, and its button is placed before the Axes
button.

Change-Id: Ied194c20438e573a237ce36f221b9be87cfd4bab
This commit is contained in:
Gabriel Ozouf
2020-10-02 16:10:14 +02:00
committed by Émilie Feral
parent 43d21180bc
commit bf76b56f90
11 changed files with 15 additions and 9 deletions

View File

@@ -25,17 +25,17 @@ InteractiveCurveViewController::InteractiveCurveViewController(Responder * paren
graphController->normalizeButtonAction();
return true;
}, this), KDFont::SmallFont),
m_zoomButton(this, I18n::Message::Navigate, Invocation([](void * context, void * sender) {
InteractiveCurveViewController * graphController = (InteractiveCurveViewController *) context;
graphController->navigationButtonAction();
return true;
}, this), KDFont::SmallFont),
m_rangeButton(this, I18n::Message::Axis, Invocation([](void * context, void * sender) {
InteractiveCurveViewController * graphController = (InteractiveCurveViewController *) context;
graphController->rangeParameterController()->setRange(graphController->interactiveRange());
StackViewController * stack = graphController->stackController();
stack->push(graphController->rangeParameterController());
return true;
}, this), KDFont::SmallFont),
m_zoomButton(this, I18n::Message::Zoom, Invocation([](void * context, void * sender) {
InteractiveCurveViewController * graphController = (InteractiveCurveViewController *) context;
graphController->navigationButtonAction();
return true;
}, this), KDFont::SmallFont)
{
}
@@ -138,7 +138,7 @@ int InteractiveCurveViewController::numberOfButtons(ButtonRowController::Positio
}
Button * InteractiveCurveViewController::buttonAtIndex(int index, ButtonRowController::Position position) const {
const Button * buttons[] = {&m_autoButton, &m_normalizeButton, &m_rangeButton, &m_zoomButton};
const Button * buttons[] = {&m_autoButton, &m_normalizeButton, &m_zoomButton, &m_rangeButton};
return (Button *)buttons[index];
}