Tuner / Player screens: allow octave 0
This commit is contained in:
parent
48afd68d06
commit
91403124b2
3 changed files with 9 additions and 7 deletions
|
@ -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()
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue