From 91403124b2876564df5cf91e24a93e84bf5cfbf4 Mon Sep 17 00:00:00 2001 From: Louis-Joseph Fournier Date: Wed, 13 Jan 2016 11:16:16 +0100 Subject: [PATCH] Tuner / Player screens: allow octave 0 --- qml/PlayerScreen.qml | 10 ++++++---- qml/ScaleToise.qml | 2 +- qml/TunerScreen.qml | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/qml/PlayerScreen.qml b/qml/PlayerScreen.qml index b395f69..e18beb6 100644 --- a/qml/PlayerScreen.qml +++ b/qml/PlayerScreen.qml @@ -113,7 +113,7 @@ Item { onReleased: { note = tuner.note = index % 12 octave = tuner.octave = index / 12 - toise_octave.index = tuner.octave - 1 + toise_octave.index = tuner.octave toise_octave.updateFlickable() } } @@ -142,7 +142,7 @@ Item { theme: main.theme - marks: [1, 2, 3, 4, 5, 6, 7, 8] + marks: [0, 1, 2, 3, 4, 5, 6, 7, 8] min: 0 max: marks.length - 1 //nb_marks_displayed: is_portrait ? 4 : 3 @@ -152,7 +152,7 @@ Item { //index: tuner.octave - 1 onReleased: { - tuner.octave = index + 1 + tuner.octave = index toise.octave = tuner.octave } } @@ -169,9 +169,11 @@ Item { /// update toise indexes if tuner note and octave changed from exterior function update() { + toise.flik_enable = false toise.note = tuner.note toise.octave = tuner.octave - toise_octave.index = tuner.octave - 1 + toise_octave.index = tuner.octave + toise.flik_enable = true } Component.onCompleted: update() diff --git a/qml/ScaleToise.qml b/qml/ScaleToise.qml index 43165e7..4f37c20 100644 --- a/qml/ScaleToise.qml +++ b/qml/ScaleToise.qml @@ -59,7 +59,7 @@ ToiseFlickable { } // ToiseFlikcable parameters - min: notes_en.length * 1 // ut 1 + min: notes_en.length * 0 // ut 0 max: notes_en.length * 9 - 1 // si 8 onOctaveChanged: { diff --git a/qml/TunerScreen.qml b/qml/TunerScreen.qml index 655e18e..cc5e9e9 100644 --- a/qml/TunerScreen.qml +++ b/qml/TunerScreen.qml @@ -145,13 +145,13 @@ Item { anchors.rightMargin: is_portrait ? (parent.width - width) / 2 : parent.width / 20 theme: main.theme - marks: [1, 2, 3, 4, 5, 6, 7, 8] + marks: [0, 1, 2, 3, 4, 5, 6, 7, 8] nb_marks_displayed: is_portrait ? 4 : 3 width: is_portrait ? meter.width / 2 : parent.width / 6 height: parent.toise_h - index: tuner.octave - 1 + index: tuner.octave } }