diff --git a/src/qml/MainWindow.qml b/src/qml/MainWindow.qml index 489ea46c771ed0020a95ed2e2f4616b8849c589c..f4e278bfed0501daef6521fd3ca2bd2925beefe1 100644 --- a/src/qml/MainWindow.qml +++ b/src/qml/MainWindow.qml @@ -66,22 +66,29 @@ ApplicationWindow { MainMenu { id: mainMenu } header: mainMenu.toolBar - Grid { - anchors.fill: parent - columns: GLOB.instrument.isSax ? 2 : 1 + MainScore { + id: score + height: nootkaWindow.height - (header ? header.height : 0) - (GLOB.instrument.isSax ? (GLOB.singleNoteMode ? instrument.height / 7 : 0) : instrument.height) + width: (parent.width - (GLOB.instrument.isSax ? instrument.width : 0)) / (GLOB.singleNoteMode ? 2 : 1) + z: 5 + } - MainScore { - id: score - height: nootkaWindow.height - (header ? header.height : 0) - (GLOB.instrument.isSax ? 0 : instrument.height) - width: parent.width - (GLOB.instrument.isSax ? instrument.width : 0) - z: 5 - } + Instrument { + id: instrument + score: score + } - Instrument { - id: instrument - z: 1 - score: score - } + Loader { + active: GLOB.singleNoteMode + source: "qrc:/NoteName.qml" + width: score.width + height: score.height + x: score.width + 1 + z: 5 + onLoaded: { + item.note = Qt.binding(function() { return score.note }) + item.onNoteChanged.connect(function() { score.setNote(score.scoreObj.note(0), item.note) }) + } } Component.onCompleted: { diff --git a/src/qml/instruments/Instrument.qml b/src/qml/instruments/Instrument.qml index b68e76d3bc021fee8b633676ba734e7b92027fd2..a9ba98d17c53a0aa2093eeb034bb6003e884747e 100644 --- a/src/qml/instruments/Instrument.qml +++ b/src/qml/instruments/Instrument.qml @@ -17,6 +17,9 @@ Item { height: GLOB.instrument.isSax ? parent.height : Math.max(parent.height / GLOB.instrument.heightPart, nootkaWindow.fontSize * 12) width: parent.width * (GLOB.instrument.isSax ? 0.15 : 1) + y: GLOB.instrument.isSax ? 0 : score.height + 1 + x: GLOB.instrument.isSax ? parent.width - width : 0 + z: 1 Loader { id: instrLoad