mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/shared] Add toggle buttons in Graph view
Change-Id: I7548d11fb114b2605ce34d3bda0776277b79ff9d
This commit is contained in:
committed by
Émilie Feral
parent
a76e54642c
commit
2f97dab6d1
@@ -69,6 +69,11 @@ float InteractiveCurveViewController::addMargin(float y, float range, bool isVer
|
||||
return y + ratio * range;
|
||||
}
|
||||
|
||||
void InteractiveCurveViewController::updateZoomButtons() {
|
||||
m_autoButton.setState(m_interactiveRange->zoomAuto());
|
||||
m_normalizeButton.setState(m_interactiveRange->zoomNormalize());
|
||||
}
|
||||
|
||||
const char * InteractiveCurveViewController::title() {
|
||||
return I18n::translate(I18n::Message::GraphTab);
|
||||
}
|
||||
@@ -304,9 +309,7 @@ bool InteractiveCurveViewController::autoButtonAction() {
|
||||
}
|
||||
|
||||
bool InteractiveCurveViewController::normalizeButtonAction() {
|
||||
if (m_interactiveRange->zoomNormalize()) {
|
||||
m_interactiveRange->setZoomNormalize(false);
|
||||
} else {
|
||||
if (!m_interactiveRange->zoomNormalize()) {
|
||||
m_interactiveRange->setZoomAuto(false);
|
||||
m_interactiveRange->normalize();
|
||||
setCurveViewAsMainView();
|
||||
|
||||
Reference in New Issue
Block a user