From 6b8caaffd15d762f4aea3a8dfac058e10fd7fcc2 Mon Sep 17 00:00:00 2001 From: Alessandro Culatti <99362337+looptailG@users.noreply.github.com> Date: Sun, 13 Oct 2024 11:12:33 +0200 Subject: [PATCH 01/11] Updated version number --- source/FifthGeneratedTuner.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/FifthGeneratedTuner.qml b/source/FifthGeneratedTuner.qml index 877f58f..4966ee0 100644 --- a/source/FifthGeneratedTuner.qml +++ b/source/FifthGeneratedTuner.qml @@ -32,7 +32,7 @@ MuseScore description: "Retune the selection, or the whole score if nothing is selected, using the specified fifth size."; categoryCode: "playback"; thumbnailName: "FifthGeneratedTunerThumbnail.png"; - version: "1.3.0"; + version: "1.3.1"; pluginType: "dialog"; width: 470; From f5d8db9a0012673e6e14297289d70cea173cdc60 Mon Sep 17 00:00:00 2001 From: Alessandro Culatti <99362337+looptailG@users.noreply.github.com> Date: Sun, 13 Oct 2024 11:15:16 +0200 Subject: [PATCH 02/11] Updated AccidentalUtils to version 1.0.1 --- source/libs/AccidentalUtils.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/source/libs/AccidentalUtils.js b/source/libs/AccidentalUtils.js index 3f0cf0d..6ff25a8 100644 --- a/source/libs/AccidentalUtils.js +++ b/source/libs/AccidentalUtils.js @@ -16,9 +16,8 @@ along with this program. If not, see . */ -const VERSION = "1.0.0"; +const VERSION = "1.0.1"; -// TODO: Check which accidentals are actually handled by the tpc property. const ACCIDENTAL_DATA = { "NONE": { @@ -532,12 +531,12 @@ const ACCIDENTAL_DATA = { }, "SIX_TWELFTH_FLAT": { - "TPC": false, + "TPC": true, "DEFAULT_OFFSET": 0, }, "SIX_TWELFTH_SHARP": { - "TPC": false, + "TPC": true, "DEFAULT_OFFSET": 0, }, "SEVEN_TWELFTH_FLAT": @@ -711,14 +710,6 @@ function getAccidentalName(note) // corresponding to the enum value. Parsing it as int is needed to properly // compare it with the enum values in a switch statement. var accidentalType = parseInt("" + note.accidentalType); - // TODO: Check if it's still necessary for MS 4.4 and later. - // In Musescore3 the accidentalType property is a signed integer, while the - // Accidentals enum values are always positive. If it's negative, convert - // it to an unsigned 8 bit integer by shifting it by 256. - if (accidentalType < 0) - { - accidentalType += 256; - } if ((accidentalType < 0) || (accidentalType >= 256)) { throw "Out of bound accidental type: " + accidentalType; @@ -1135,6 +1126,6 @@ function getAccidentalName(note) return "SAGITTAL_SHARP"; default: - throw "Unrecognised accidental: " + note.accidentalType; + throw "Unrecognised accidental type: " + note.accidentalType; } } From 18c8e07af19cd5cde8c1253a5c33e1cc06ff2691 Mon Sep 17 00:00:00 2001 From: Alessandro Culatti <99362337+looptailG@users.noreply.github.com> Date: Sun, 13 Oct 2024 11:20:04 +0200 Subject: [PATCH 03/11] Merged together two if statements in the tune notes section --- source/FifthGeneratedTuner.qml | 41 ++++++++++++++++------------------ 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/source/FifthGeneratedTuner.qml b/source/FifthGeneratedTuner.qml index 4966ee0..343a9d0 100644 --- a/source/FifthGeneratedTuner.qml +++ b/source/FifthGeneratedTuner.qml @@ -925,33 +925,17 @@ MuseScore while (cursor.segment && (cursor.tick < endTick)) { // Tune notes. - if (cursor.element) + if (cursor.element && (cursor.element.type == Element.CHORD)) { - if (cursor.element.type == Element.CHORD) + var graceChords = cursor.element.graceNotes; + for (var i = 0; i < graceChords.length; i++) { - var graceChords = cursor.element.graceNotes; - for (var i = 0; i < graceChords.length; i++) - { - var notes = graceChords[i].notes; - for (var j = 0; j < notes.length; j++) - { - try - { - notes[j].tuning = calculateTuningOffset(notes[j]); - } - catch (error) - { - logger.error(error); - } - } - } - - var notes = cursor.element.notes; - for (var i = 0; i < notes.length; i++) + var notes = graceChords[i].notes; + for (var j = 0; j < notes.length; j++) { try { - notes[i].tuning = calculateTuningOffset(notes[i]); + notes[j].tuning = calculateTuningOffset(notes[j]); } catch (error) { @@ -959,6 +943,19 @@ MuseScore } } } + + var notes = cursor.element.notes; + for (var i = 0; i < notes.length; i++) + { + try + { + notes[i].tuning = calculateTuningOffset(notes[i]); + } + catch (error) + { + logger.error(error); + } + } } cursor.next(); From be1a491fd75f6f124271a7a9b1a13a0021dc6054 Mon Sep 17 00:00:00 2001 From: Alessandro Culatti <99362337+looptailG@users.noreply.github.com> Date: Sun, 13 Oct 2024 11:24:34 +0200 Subject: [PATCH 04/11] Incorporated the code of writeLogMessages() in the function log() --- source/FifthGeneratedTuner.qml | 37 +--------------------------------- 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/source/FifthGeneratedTuner.qml b/source/FifthGeneratedTuner.qml index 343a9d0..406d766 100644 --- a/source/FifthGeneratedTuner.qml +++ b/source/FifthGeneratedTuner.qml @@ -98,14 +98,12 @@ MuseScore { outputMessageArea.text = error; logger.error(error.toString()); - logger.writeLogMessages(); } } onRejected: { logger.log("Tuning canceled."); - logger.writeLogMessages(); } } @@ -148,7 +146,6 @@ MuseScore { outputMessageArea.text = error.toString(); logger.error(error.toString()); - logger.writeLogMessages(); } } } @@ -225,7 +222,6 @@ MuseScore { outputMessageArea.text = error.toString(); logger.error(error.toString()); - logger.writeLogMessages(); } } } @@ -255,6 +251,7 @@ MuseScore if (logLevel >= currentLogLevel) { logMessages += DateUtils.getRFC3339DateTime() + logLevels[logLevel] + message + "\n"; + write(logMessages); } } @@ -277,14 +274,6 @@ MuseScore { log(message, 4); } - - function writeLogMessages() - { - if (logMessages != "") - { - write(logMessages); - } - } } FileIO @@ -296,7 +285,6 @@ MuseScore { outputMessageArea.text = msg; logger.error(msg); - logger.writeLogMessages(); } } @@ -309,7 +297,6 @@ MuseScore { outputMessageArea.text = msg; logger.error(msg); - logger.writeLogMessages(); } } @@ -389,10 +376,6 @@ MuseScore outputMessageArea.text = error; logger.error(error); } - finally - { - logger.writeLogMessages(); - } } } } @@ -429,10 +412,6 @@ MuseScore outputMessageArea.text = error.toString(); logger.error(error); } - finally - { - logger.writeLogMessages(); - } } } @@ -456,10 +435,6 @@ MuseScore outputMessageArea.text = error.toString(); logger.error(error); } - finally - { - logger.writeLogMessages(); - } } } } @@ -973,8 +948,6 @@ MuseScore } finally { - logger.writeLogMessages(); - quit(); } } @@ -1052,10 +1025,6 @@ MuseScore { logger.fatal(error.toString()); } - finally - { - logger.writeLogMessages(); - } } onRun: @@ -1083,7 +1052,6 @@ MuseScore settingsIO.write(fileContent); logger.log("Settings file updated successfully."); - logger.writeLogMessages(); } /** @@ -1184,7 +1152,6 @@ MuseScore } logger.log("Custom tunings loaded successfully."); - logger.writeLogMessages(); } /** @@ -1207,7 +1174,6 @@ MuseScore customTuningsIO.write(StringUtils.removeEmptyRows(fileContent)); logger.log("New custom tuning added successfully."); - logger.writeLogMessages(); } /** @@ -1234,6 +1200,5 @@ MuseScore customTuningsIO.write(StringUtils.removeEmptyRows(fileContent.join("\n"))); logger.log("Tuning deleted successfully."); - logger.writeLogMessages(); } } From 8de6fe5559f4b42441825fc643b238c8e4d770f4 Mon Sep 17 00:00:00 2001 From: Alessandro Culatti <99362337+looptailG@users.noreply.github.com> Date: Sun, 13 Oct 2024 21:46:50 +0200 Subject: [PATCH 05/11] Moved every component within a single column --- source/FifthGeneratedTuner.qml | 841 +++++++++++++++++---------------- 1 file changed, 421 insertions(+), 420 deletions(-) diff --git a/source/FifthGeneratedTuner.qml b/source/FifthGeneratedTuner.qml index 406d766..f1779d9 100644 --- a/source/FifthGeneratedTuner.qml +++ b/source/FifthGeneratedTuner.qml @@ -304,538 +304,539 @@ MuseScore { anchors.fill: parent; - Row + Column { x: 10; y: 10; spacing: 10; - Text + Row { - text: "Fifth size in cents:"; - font.pixelSize: 20; - } - - TextField - { - placeholderText: qsTr(smallestFifthString + " - " + largestFifthString); - font.family: monospacedFont; - id: fifthSizeField; - width: 150; - height: 30; - } - - Button - { - width: 100; - height: 30; - text: "Tune"; - onClicked: + spacing: 10; + + Text { - try + text: "Fifth size in cents:"; + font.pixelSize: 20; + } + + TextField + { + placeholderText: qsTr(smallestFifthString + " - " + largestFifthString); + font.family: monospacedFont; + id: fifthSizeField; + width: 150; + height: 30; + } + + Button + { + width: 100; + height: 30; + text: "Tune"; + onClicked: { - // Read the input fifth size. - var fifthSize = parseFloat(fifthSizeField.text); - if (isNaN(fifthSize)) + try { - if (fifthSizeField.text == "") + // Read the input fifth size. + var fifthSize = parseFloat(fifthSizeField.text); + if (isNaN(fifthSize)) { - throw "Empty input field."; + if (fifthSizeField.text == "") + { + throw "Empty input field."; + } + else + { + throw "Cannot convert to number the input fifth size: " + fifthSizeField.text; + } } else { - throw "Cannot convert to number the input fifth size: " + fifthSizeField.text; + logger.log("Fifth size: " + fifthSize); + fifthDeviation = TuningUtils.DEFAULT_FIFTH - fifthSize; + logger.log("Fifth deviation: " + fifthDeviation); + + if (fifthSize < TuningUtils.SMALLEST_DIATONIC_FIFTH) + { + logger.warning("Fifth smaller than the smallest diatonic fifth: " + fifthSize); + fifthSizeDialogText.text = "The input fifth is smaller than " + smallestFifthString + " ¢, which is the smallest fifth for which standard notation makes sense.\nThe plugin can work anyway, but it could produce some counterintuitive results.\nTune the score anyway?"; + fifthSizeDialog.open(); + } + else if (fifthSize > TuningUtils.LARGEST_DIATONIC_FIFTH) + { + logger.warning("Fifth larger than the largest diatonic fifth: " + fifthSize); + fifthSizeDialogText.text = "The input fifth is larger than " + largestFifthString + " ¢, which is the largest fifth for which standard notation makes sense.\nThe plugin can work anyway, but it could produce some counterintuitive results.\nTune the score anyway?"; + fifthSizeDialog.open(); + } + else + { + tuneNotes(); + } } } - else + catch (error) { - logger.log("Fifth size: " + fifthSize); - fifthDeviation = TuningUtils.DEFAULT_FIFTH - fifthSize; - logger.log("Fifth deviation: " + fifthDeviation); - - if (fifthSize < TuningUtils.SMALLEST_DIATONIC_FIFTH) - { - logger.warning("Fifth smaller than the smallest diatonic fifth: " + fifthSize); - fifthSizeDialogText.text = "The input fifth is smaller than " + smallestFifthString + " ¢, which is the smallest fifth for which standard notation makes sense.\nThe plugin can work anyway, but it could produce some counterintuitive results.\nTune the score anyway?"; - fifthSizeDialog.open(); - } - else if (fifthSize > TuningUtils.LARGEST_DIATONIC_FIFTH) - { - logger.warning("Fifth larger than the largest diatonic fifth: " + fifthSize); - fifthSizeDialogText.text = "The input fifth is larger than " + largestFifthString + " ¢, which is the largest fifth for which standard notation makes sense.\nThe plugin can work anyway, but it could produce some counterintuitive results.\nTune the score anyway?"; - fifthSizeDialog.open(); - } - else - { - tuneNotes(); - } + outputMessageArea.text = error; + logger.error(error); } } - catch (error) - { - outputMessageArea.text = error; - logger.error(error); - } } } - } - Row - { - x: 10; - y: 50; - spacing: 10; - - Text - { - text: "Reference note:"; - font.pixelSize: 15; - } - - ComboBox - { - id: referenceNoteNameComboBox; - model: ["A", "B", "C", "D", "E", "F", "G"]; - width: 50; - onActivated: - { - try - { - settings["ReferenceNoteNameIndex"] = referenceNoteNameComboBox.currentIndex; - writeSettings(); - referenceNoteName = referenceNoteNameComboBox.currentText; - referenceNote = referenceNoteName + ((referenceNoteAccidental == "-") ? "" : referenceNoteAccidental); - logger.log("Reference note changed to: " + referenceNote); - } - catch (error) - { - outputMessageArea.text = error.toString(); - logger.error(error); - } - } - } - - ComboBox - { - id: referenceNoteAccidentalComboBox; - model: ["bbb", "bb", "b", "-", "#", "x", "#x"]; - width: 50; - onActivated: - { - try - { - settings["ReferenceNoteAccidentalIndex"] = referenceNoteAccidentalComboBox.currentIndex; - writeSettings(); - referenceNoteAccidental = referenceNoteAccidentalComboBox.currentText; - referenceNote = referenceNoteName + ((referenceNoteAccidental == "-") ? "" : referenceNoteAccidental); - logger.log("Reference note changed to: " + referenceNote); - } - catch (error) - { - outputMessageArea.text = error.toString(); - logger.error(error); - } - } - } - } - - Row - { - x: 10; - y: 100; - spacing: 50; - - Column + Row { spacing: 10; Text { - text: "EDOs"; + text: "Reference note:"; font.pixelSize: 15; } - Button + ComboBox { - width: buttonWidth; - height: buttonHeight; - text: "5"; - onClicked: + id: referenceNoteNameComboBox; + model: ["A", "B", "C", "D", "E", "F", "G"]; + width: 50; + onActivated: { - fifthSizeField.text = 1200.0 / 5 * 3; + try + { + settings["ReferenceNoteNameIndex"] = referenceNoteNameComboBox.currentIndex; + writeSettings(); + referenceNoteName = referenceNoteNameComboBox.currentText; + referenceNote = referenceNoteName + ((referenceNoteAccidental == "-") ? "" : referenceNoteAccidental); + logger.log("Reference note changed to: " + referenceNote); + } + catch (error) + { + outputMessageArea.text = error.toString(); + logger.error(error); + } } } - Button + ComboBox { - width: buttonWidth; - height: buttonHeight; - text: "7"; - onClicked: + id: referenceNoteAccidentalComboBox; + model: ["bbb", "bb", "b", "-", "#", "x", "#x"]; + width: 50; + onActivated: { - fifthSizeField.text = 1200.0 / 7 * 4; + try + { + settings["ReferenceNoteAccidentalIndex"] = referenceNoteAccidentalComboBox.currentIndex; + writeSettings(); + referenceNoteAccidental = referenceNoteAccidentalComboBox.currentText; + referenceNote = referenceNoteName + ((referenceNoteAccidental == "-") ? "" : referenceNoteAccidental); + logger.log("Reference note changed to: " + referenceNote); + } + catch (error) + { + outputMessageArea.text = error.toString(); + logger.error(error); + } } } + } + + Row + { + spacing: 50; - Button + Column { - width: buttonWidth; - height: buttonHeight; - text: "12"; - onClicked: + spacing: 10; + + Text { - fifthSizeField.text = TuningUtils.DEFAULT_FIFTH; + text: "EDOs"; + font.pixelSize: 15; } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "17"; - onClicked: + + Button { - fifthSizeField.text = 1200.0 / 17 * 10; + width: buttonWidth; + height: buttonHeight; + text: "5"; + onClicked: + { + fifthSizeField.text = 1200.0 / 5 * 3; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "19"; - onClicked: + + Button { - fifthSizeField.text = 1200.0 / 19 * 11; + width: buttonWidth; + height: buttonHeight; + text: "7"; + onClicked: + { + fifthSizeField.text = 1200.0 / 7 * 4; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "26"; - onClicked: + + Button { - fifthSizeField.text = 1200.0 / 26 * 15; + width: buttonWidth; + height: buttonHeight; + text: "12"; + onClicked: + { + fifthSizeField.text = TuningUtils.DEFAULT_FIFTH; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "29"; - onClicked: + + Button { - fifthSizeField.text = 1200.0 / 29 * 17; + width: buttonWidth; + height: buttonHeight; + text: "17"; + onClicked: + { + fifthSizeField.text = 1200.0 / 17 * 10; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "31"; - onClicked: + + Button { - fifthSizeField.text = 1200.0 / 31 * 18; + width: buttonWidth; + height: buttonHeight; + text: "19"; + onClicked: + { + fifthSizeField.text = 1200.0 / 19 * 11; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "41"; - onClicked: + + Button { - fifthSizeField.text = 1200.0 / 41 * 24; + width: buttonWidth; + height: buttonHeight; + text: "26"; + onClicked: + { + fifthSizeField.text = 1200.0 / 26 * 15; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "43"; - onClicked: + + Button { - fifthSizeField.text = 1200.0 / 43 * 25; + width: buttonWidth; + height: buttonHeight; + text: "29"; + onClicked: + { + fifthSizeField.text = 1200.0 / 29 * 17; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "50"; - onClicked: + + Button { - fifthSizeField.text = 1200.0 / 50 * 29; + width: buttonWidth; + height: buttonHeight; + text: "31"; + onClicked: + { + fifthSizeField.text = 1200.0 / 31 * 18; + } } - } - } - - Column - { - spacing: 10; - - Text - { - text: "Meantones"; - font.pixelSize: 15; - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "1/3 Comma"; - onClicked: + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "41"; + onClicked: + { + fifthSizeField.text = 1200.0 / 41 * 24; + } + } + + Button { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 3; + width: buttonWidth; + height: buttonHeight; + text: "43"; + onClicked: + { + fifthSizeField.text = 1200.0 / 43 * 25; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "2/7 Comma"; - onClicked: + + Button { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 2 / 7; + width: buttonWidth; + height: buttonHeight; + text: "50"; + onClicked: + { + fifthSizeField.text = 1200.0 / 50 * 29; + } } } - Button + Column { - width: buttonWidth; - height: buttonHeight; - text: "7/26 Comma"; - onClicked: + spacing: 10; + + Text { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 7 / 26; + text: "Meantones"; + font.pixelSize: 15; } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "1/4 Comma"; - onClicked: + + Button { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 4; + width: buttonWidth; + height: buttonHeight; + text: "1/3 Comma"; + onClicked: + { + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 3; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "2/9 Comma"; - onClicked: + + Button { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 2 / 9; + width: buttonWidth; + height: buttonHeight; + text: "2/7 Comma"; + onClicked: + { + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 2 / 7; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "1/5 Comma"; - onClicked: + + Button { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 5; + width: buttonWidth; + height: buttonHeight; + text: "7/26 Comma"; + onClicked: + { + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 7 / 26; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "1/6 Comma"; - onClicked: + + Button { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 6; + width: buttonWidth; + height: buttonHeight; + text: "1/4 Comma"; + onClicked: + { + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 4; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "Golden"; - onClicked: + + Button { - fifthSizeField.text = 600.0 / 11 * (15 - Math.sqrt(5)); + width: buttonWidth; + height: buttonHeight; + text: "2/9 Comma"; + onClicked: + { + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 2 / 9; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "Tungsten"; - onClicked: + + Button { - fifthSizeField.text = 600.0 * (Math.sqrt(10) - 2); + width: buttonWidth; + height: buttonHeight; + text: "1/5 Comma"; + onClicked: + { + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 5; + } } - } - } - - Column - { - spacing: 10; - - Text - { - text: "Others"; - font.pixelSize: 15; - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "Pythagorean"; - onClicked: + + Button { - fifthSizeField.text = TuningUtils.JUST_FIFTH; + width: buttonWidth; + height: buttonHeight; + text: "1/6 Comma"; + onClicked: + { + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 6; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: ""; - property var customFifthSize0; - id: custom0; - visible: false; - onClicked: + + Button { - fifthSizeField.text = customFifthSize0; + width: buttonWidth; + height: buttonHeight; + text: "Golden"; + onClicked: + { + fifthSizeField.text = 600.0 / 11 * (15 - Math.sqrt(5)); + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: ""; - property var customFifthSize1; - id: custom1; - visible: false; - onClicked: + + Button { - fifthSizeField.text = customFifthSize1; + width: buttonWidth; + height: buttonHeight; + text: "Tungsten"; + onClicked: + { + fifthSizeField.text = 600.0 * (Math.sqrt(10) - 2); + } } } - Button + Column { - width: buttonWidth; - height: buttonHeight; - text: ""; - property var customFifthSize2; - id: custom2; - visible: false; - onClicked: + spacing: 10; + + Text { - fifthSizeField.text = customFifthSize2; + text: "Others"; + font.pixelSize: 15; } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: ""; - property var customFifthSize3; - id: custom3; - visible: false; - onClicked: + + Button { - fifthSizeField.text = customFifthSize3; + width: buttonWidth; + height: buttonHeight; + text: "Pythagorean"; + onClicked: + { + fifthSizeField.text = TuningUtils.JUST_FIFTH; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: ""; - property var customFifthSize4; - id: custom4; - visible: false; - onClicked: + + Button { - fifthSizeField.text = customFifthSize4; + width: buttonWidth; + height: buttonHeight; + text: ""; + property var customFifthSize0; + id: custom0; + visible: false; + onClicked: + { + fifthSizeField.text = customFifthSize0; + } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "Add Custom"; - font.italic: true; - id: addCustom; - onClicked: + + Button { - try + width: buttonWidth; + height: buttonHeight; + text: ""; + property var customFifthSize1; + id: custom1; + visible: false; + onClicked: { - newCustomTuningDialog.open(); + fifthSizeField.text = customFifthSize1; } - catch (error) + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: ""; + property var customFifthSize2; + id: custom2; + visible: false; + onClicked: { - outputMessageArea.text = error; + fifthSizeField.text = customFifthSize2; } } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "Delete Custom"; - font.italic: true; - id: deleteCustom; - onClicked: + + Button { - try + width: buttonWidth; + height: buttonHeight; + text: ""; + property var customFifthSize3; + id: custom3; + visible: false; + onClicked: { - deleteCustomDialog.open(); + fifthSizeField.text = customFifthSize3; } - catch (error) + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: ""; + property var customFifthSize4; + id: custom4; + visible: false; + onClicked: { - outputMessageArea.text = error.toString(); + fifthSizeField.text = customFifthSize4; + } + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "Add Custom"; + font.italic: true; + id: addCustom; + onClicked: + { + try + { + newCustomTuningDialog.open(); + } + catch (error) + { + outputMessageArea.text = error; + } + } + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "Delete Custom"; + font.italic: true; + id: deleteCustom; + onClicked: + { + try + { + deleteCustomDialog.open(); + } + catch (error) + { + outputMessageArea.text = error.toString(); + } } } } } - } - - Row - { - x: 10; - y: 700; - spacing: 10; - TextArea + Row { - id: outputMessageArea; - text: ""; - font.family: monospacedFont; - readOnly: true; - width: 450; - height: 50; + spacing: 10; + + TextArea + { + id: outputMessageArea; + text: ""; + font.family: monospacedFont; + readOnly: true; + width: 450; + height: 50; + } } } + + } /** From 64d80b3118a418ae4ea2659c672afe6289643018 Mon Sep 17 00:00:00 2001 From: Alessandro Culatti <99362337+looptailG@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:20:04 +0200 Subject: [PATCH 06/11] Removed Rectangle --- source/FifthGeneratedTuner.qml | 848 ++++++++++++++++----------------- 1 file changed, 421 insertions(+), 427 deletions(-) diff --git a/source/FifthGeneratedTuner.qml b/source/FifthGeneratedTuner.qml index f1779d9..cea63b0 100644 --- a/source/FifthGeneratedTuner.qml +++ b/source/FifthGeneratedTuner.qml @@ -35,8 +35,8 @@ MuseScore version: "1.3.1"; pluginType: "dialog"; - width: 470; - height: 760; + width: guiColumn.implicitWidth; + height: guiColumn.implicitHeight; property variant settings: {}; @@ -300,543 +300,537 @@ MuseScore } } - Rectangle + Column { - anchors.fill: parent; + id: guiColumn; + anchors.centerIn: parent; + anchors.margins: 10; + spacing: 10; - Column + Row { - x: 10; - y: 10; spacing: 10; - Row + Text { - spacing: 10; - - Text - { - text: "Fifth size in cents:"; - font.pixelSize: 20; - } - - TextField - { - placeholderText: qsTr(smallestFifthString + " - " + largestFifthString); - font.family: monospacedFont; - id: fifthSizeField; - width: 150; - height: 30; - } - - Button + text: "Fifth size in cents:"; + font.pixelSize: 20; + } + + TextField + { + placeholderText: qsTr(smallestFifthString + " - " + largestFifthString); + font.family: monospacedFont; + id: fifthSizeField; + width: 150; + height: 30; + } + + Button + { + width: 100; + height: 30; + text: "Tune"; + onClicked: { - width: 100; - height: 30; - text: "Tune"; - onClicked: + try { - try + // Read the input fifth size. + var fifthSize = parseFloat(fifthSizeField.text); + if (isNaN(fifthSize)) { - // Read the input fifth size. - var fifthSize = parseFloat(fifthSizeField.text); - if (isNaN(fifthSize)) + if (fifthSizeField.text == "") { - if (fifthSizeField.text == "") - { - throw "Empty input field."; - } - else - { - throw "Cannot convert to number the input fifth size: " + fifthSizeField.text; - } + throw "Empty input field."; } else { - logger.log("Fifth size: " + fifthSize); - fifthDeviation = TuningUtils.DEFAULT_FIFTH - fifthSize; - logger.log("Fifth deviation: " + fifthDeviation); - - if (fifthSize < TuningUtils.SMALLEST_DIATONIC_FIFTH) - { - logger.warning("Fifth smaller than the smallest diatonic fifth: " + fifthSize); - fifthSizeDialogText.text = "The input fifth is smaller than " + smallestFifthString + " ¢, which is the smallest fifth for which standard notation makes sense.\nThe plugin can work anyway, but it could produce some counterintuitive results.\nTune the score anyway?"; - fifthSizeDialog.open(); - } - else if (fifthSize > TuningUtils.LARGEST_DIATONIC_FIFTH) - { - logger.warning("Fifth larger than the largest diatonic fifth: " + fifthSize); - fifthSizeDialogText.text = "The input fifth is larger than " + largestFifthString + " ¢, which is the largest fifth for which standard notation makes sense.\nThe plugin can work anyway, but it could produce some counterintuitive results.\nTune the score anyway?"; - fifthSizeDialog.open(); - } - else - { - tuneNotes(); - } + throw "Cannot convert to number the input fifth size: " + fifthSizeField.text; } } - catch (error) + else { - outputMessageArea.text = error; - logger.error(error); + logger.log("Fifth size: " + fifthSize); + fifthDeviation = TuningUtils.DEFAULT_FIFTH - fifthSize; + logger.log("Fifth deviation: " + fifthDeviation); + + if (fifthSize < TuningUtils.SMALLEST_DIATONIC_FIFTH) + { + logger.warning("Fifth smaller than the smallest diatonic fifth: " + fifthSize); + fifthSizeDialogText.text = "The input fifth is smaller than " + smallestFifthString + " ¢, which is the smallest fifth for which standard notation makes sense.\nThe plugin can work anyway, but it could produce some counterintuitive results.\nTune the score anyway?"; + fifthSizeDialog.open(); + } + else if (fifthSize > TuningUtils.LARGEST_DIATONIC_FIFTH) + { + logger.warning("Fifth larger than the largest diatonic fifth: " + fifthSize); + fifthSizeDialogText.text = "The input fifth is larger than " + largestFifthString + " ¢, which is the largest fifth for which standard notation makes sense.\nThe plugin can work anyway, but it could produce some counterintuitive results.\nTune the score anyway?"; + fifthSizeDialog.open(); + } + else + { + tuneNotes(); + } } } + catch (error) + { + outputMessageArea.text = error; + logger.error(error); + } + } + } + } + + Row + { + spacing: 10; + + Text + { + text: "Reference note:"; + font.pixelSize: 15; + } + + ComboBox + { + id: referenceNoteNameComboBox; + model: ["A", "B", "C", "D", "E", "F", "G"]; + width: 50; + onActivated: + { + try + { + settings["ReferenceNoteNameIndex"] = referenceNoteNameComboBox.currentIndex; + writeSettings(); + referenceNoteName = referenceNoteNameComboBox.currentText; + referenceNote = referenceNoteName + ((referenceNoteAccidental == "-") ? "" : referenceNoteAccidental); + logger.log("Reference note changed to: " + referenceNote); + } + catch (error) + { + outputMessageArea.text = error.toString(); + logger.error(error); + } + } + } + + ComboBox + { + id: referenceNoteAccidentalComboBox; + model: ["bbb", "bb", "b", "-", "#", "x", "#x"]; + width: 50; + onActivated: + { + try + { + settings["ReferenceNoteAccidentalIndex"] = referenceNoteAccidentalComboBox.currentIndex; + writeSettings(); + referenceNoteAccidental = referenceNoteAccidentalComboBox.currentText; + referenceNote = referenceNoteName + ((referenceNoteAccidental == "-") ? "" : referenceNoteAccidental); + logger.log("Reference note changed to: " + referenceNote); + } + catch (error) + { + outputMessageArea.text = error.toString(); + logger.error(error); + } } } + } - Row + Row + { + spacing: 50; + + Column { spacing: 10; Text { - text: "Reference note:"; + text: "EDOs"; font.pixelSize: 15; } - ComboBox + Button { - id: referenceNoteNameComboBox; - model: ["A", "B", "C", "D", "E", "F", "G"]; - width: 50; - onActivated: + width: buttonWidth; + height: buttonHeight; + text: "5"; + onClicked: { - try - { - settings["ReferenceNoteNameIndex"] = referenceNoteNameComboBox.currentIndex; - writeSettings(); - referenceNoteName = referenceNoteNameComboBox.currentText; - referenceNote = referenceNoteName + ((referenceNoteAccidental == "-") ? "" : referenceNoteAccidental); - logger.log("Reference note changed to: " + referenceNote); - } - catch (error) - { - outputMessageArea.text = error.toString(); - logger.error(error); - } + fifthSizeField.text = 1200.0 / 5 * 3; } } - ComboBox + Button { - id: referenceNoteAccidentalComboBox; - model: ["bbb", "bb", "b", "-", "#", "x", "#x"]; - width: 50; - onActivated: + width: buttonWidth; + height: buttonHeight; + text: "7"; + onClicked: { - try - { - settings["ReferenceNoteAccidentalIndex"] = referenceNoteAccidentalComboBox.currentIndex; - writeSettings(); - referenceNoteAccidental = referenceNoteAccidentalComboBox.currentText; - referenceNote = referenceNoteName + ((referenceNoteAccidental == "-") ? "" : referenceNoteAccidental); - logger.log("Reference note changed to: " + referenceNote); - } - catch (error) - { - outputMessageArea.text = error.toString(); - logger.error(error); - } + fifthSizeField.text = 1200.0 / 7 * 4; } } - } - - Row - { - spacing: 50; - Column + Button { - spacing: 10; - - Text - { - text: "EDOs"; - font.pixelSize: 15; - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "5"; - onClicked: - { - fifthSizeField.text = 1200.0 / 5 * 3; - } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "7"; - onClicked: - { - fifthSizeField.text = 1200.0 / 7 * 4; - } - } - - Button + width: buttonWidth; + height: buttonHeight; + text: "12"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "12"; - onClicked: - { - fifthSizeField.text = TuningUtils.DEFAULT_FIFTH; - } + fifthSizeField.text = TuningUtils.DEFAULT_FIFTH; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "17"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "17"; - onClicked: - { - fifthSizeField.text = 1200.0 / 17 * 10; - } + fifthSizeField.text = 1200.0 / 17 * 10; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "19"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "19"; - onClicked: - { - fifthSizeField.text = 1200.0 / 19 * 11; - } + fifthSizeField.text = 1200.0 / 19 * 11; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "26"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "26"; - onClicked: - { - fifthSizeField.text = 1200.0 / 26 * 15; - } + fifthSizeField.text = 1200.0 / 26 * 15; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "29"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "29"; - onClicked: - { - fifthSizeField.text = 1200.0 / 29 * 17; - } + fifthSizeField.text = 1200.0 / 29 * 17; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "31"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "31"; - onClicked: - { - fifthSizeField.text = 1200.0 / 31 * 18; - } + fifthSizeField.text = 1200.0 / 31 * 18; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "41"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "41"; - onClicked: - { - fifthSizeField.text = 1200.0 / 41 * 24; - } + fifthSizeField.text = 1200.0 / 41 * 24; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "43"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "43"; - onClicked: - { - fifthSizeField.text = 1200.0 / 43 * 25; - } + fifthSizeField.text = 1200.0 / 43 * 25; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "50"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "50"; - onClicked: - { - fifthSizeField.text = 1200.0 / 50 * 29; - } + fifthSizeField.text = 1200.0 / 50 * 29; } } + } + + Column + { + spacing: 10; - Column + Text { - spacing: 10; - - Text + text: "Meantones"; + font.pixelSize: 15; + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "1/3 Comma"; + onClicked: { - text: "Meantones"; - font.pixelSize: 15; + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 3; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "2/7 Comma"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "1/3 Comma"; - onClicked: - { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 3; - } + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 2 / 7; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "7/26 Comma"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "2/7 Comma"; - onClicked: - { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 2 / 7; - } + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 7 / 26; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "1/4 Comma"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "7/26 Comma"; - onClicked: - { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 7 / 26; - } + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 4; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "2/9 Comma"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "1/4 Comma"; - onClicked: - { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 4; - } + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 2 / 9; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "1/5 Comma"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "2/9 Comma"; - onClicked: - { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA * 2 / 9; - } + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 5; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "1/6 Comma"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "1/5 Comma"; - onClicked: - { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 5; - } + fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 6; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "Golden"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "1/6 Comma"; - onClicked: - { - fifthSizeField.text = TuningUtils.JUST_FIFTH - TuningUtils.SYNTONIC_COMMA / 6; - } + fifthSizeField.text = 600.0 / 11 * (15 - Math.sqrt(5)); } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "Tungsten"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "Golden"; - onClicked: - { - fifthSizeField.text = 600.0 / 11 * (15 - Math.sqrt(5)); - } + fifthSizeField.text = 600.0 * (Math.sqrt(10) - 2); } - - Button + } + } + + Column + { + spacing: 10; + + Text + { + text: "Others"; + font.pixelSize: 15; + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "Pythagorean"; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "Tungsten"; - onClicked: - { - fifthSizeField.text = 600.0 * (Math.sqrt(10) - 2); - } + fifthSizeField.text = TuningUtils.JUST_FIFTH; } } - Column + Button { - spacing: 10; - - Text + width: buttonWidth; + height: buttonHeight; + text: ""; + property var customFifthSize0; + id: custom0; + visible: false; + onClicked: { - text: "Others"; - font.pixelSize: 15; + fifthSizeField.text = customFifthSize0; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: ""; + property var customFifthSize1; + id: custom1; + visible: false; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "Pythagorean"; - onClicked: - { - fifthSizeField.text = TuningUtils.JUST_FIFTH; - } + fifthSizeField.text = customFifthSize1; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: ""; + property var customFifthSize2; + id: custom2; + visible: false; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: ""; - property var customFifthSize0; - id: custom0; - visible: false; - onClicked: - { - fifthSizeField.text = customFifthSize0; - } + fifthSizeField.text = customFifthSize2; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: ""; + property var customFifthSize3; + id: custom3; + visible: false; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: ""; - property var customFifthSize1; - id: custom1; - visible: false; - onClicked: - { - fifthSizeField.text = customFifthSize1; - } + fifthSizeField.text = customFifthSize3; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: ""; + property var customFifthSize4; + id: custom4; + visible: false; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: ""; - property var customFifthSize2; - id: custom2; - visible: false; - onClicked: - { - fifthSizeField.text = customFifthSize2; - } + fifthSizeField.text = customFifthSize4; } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "Add Custom"; + font.italic: true; + id: addCustom; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: ""; - property var customFifthSize3; - id: custom3; - visible: false; - onClicked: + try { - fifthSizeField.text = customFifthSize3; + newCustomTuningDialog.open(); } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: ""; - property var customFifthSize4; - id: custom4; - visible: false; - onClicked: + catch (error) { - fifthSizeField.text = customFifthSize4; + outputMessageArea.text = error; } } - - Button + } + + Button + { + width: buttonWidth; + height: buttonHeight; + text: "Delete Custom"; + font.italic: true; + id: deleteCustom; + onClicked: { - width: buttonWidth; - height: buttonHeight; - text: "Add Custom"; - font.italic: true; - id: addCustom; - onClicked: + try { - try - { - newCustomTuningDialog.open(); - } - catch (error) - { - outputMessageArea.text = error; - } + deleteCustomDialog.open(); } - } - - Button - { - width: buttonWidth; - height: buttonHeight; - text: "Delete Custom"; - font.italic: true; - id: deleteCustom; - onClicked: + catch (error) { - try - { - deleteCustomDialog.open(); - } - catch (error) - { - outputMessageArea.text = error.toString(); - } + outputMessageArea.text = error.toString(); } } } } + } + + Row + { + spacing: 10; - Row + TextArea { - spacing: 10; - - TextArea - { - id: outputMessageArea; - text: ""; - font.family: monospacedFont; - readOnly: true; - width: 450; - height: 50; - } + id: outputMessageArea; + text: ""; + font.family: monospacedFont; + readOnly: true; + width: 450; + height: 50; } } - - } /** From f540eb443131332a518a8645ae9facee6f114971 Mon Sep 17 00:00:00 2001 From: Alessandro Culatti <99362337+looptailG@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:40:13 +0200 Subject: [PATCH 07/11] Made the window size dynamically calculated --- source/FifthGeneratedTuner.qml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source/FifthGeneratedTuner.qml b/source/FifthGeneratedTuner.qml index cea63b0..ca99c95 100644 --- a/source/FifthGeneratedTuner.qml +++ b/source/FifthGeneratedTuner.qml @@ -35,8 +35,9 @@ MuseScore version: "1.3.1"; pluginType: "dialog"; - width: guiColumn.implicitWidth; - height: guiColumn.implicitHeight; + property var padding: 10; + width: guiColumn.implicitWidth + 2*padding; + height: guiColumn.implicitHeight + 2*padding; property variant settings: {}; @@ -304,12 +305,11 @@ MuseScore { id: guiColumn; anchors.centerIn: parent; - anchors.margins: 10; - spacing: 10; + spacing: padding; Row { - spacing: 10; + spacing: padding; Text { @@ -383,7 +383,7 @@ MuseScore Row { - spacing: 10; + spacing: padding; Text { @@ -444,7 +444,7 @@ MuseScore Column { - spacing: 10; + spacing: padding; Text { @@ -576,7 +576,7 @@ MuseScore Column { - spacing: 10; + spacing: padding; Text { @@ -686,7 +686,7 @@ MuseScore Column { - spacing: 10; + spacing: padding; Text { @@ -819,7 +819,7 @@ MuseScore Row { - spacing: 10; + spacing: padding; TextArea { @@ -827,7 +827,7 @@ MuseScore text: ""; font.family: monospacedFont; readOnly: true; - width: 450; + width: 400; height: 50; } } From a43f28bcec654daec3df44a66e62d2fcc9b91ec8 Mon Sep 17 00:00:00 2001 From: Alessandro Culatti <99362337+looptailG@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:43:53 +0200 Subject: [PATCH 08/11] Centered horizontally outputMessageArea --- source/FifthGeneratedTuner.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/source/FifthGeneratedTuner.qml b/source/FifthGeneratedTuner.qml index ca99c95..505c653 100644 --- a/source/FifthGeneratedTuner.qml +++ b/source/FifthGeneratedTuner.qml @@ -819,6 +819,7 @@ MuseScore Row { + anchors.horizontalCenter: parent.horizontalCenter; spacing: padding; TextArea From 689acd55898a43e8067ddf6f151f3fb3a1420a5f Mon Sep 17 00:00:00 2001 From: Alessandro Culatti <99362337+looptailG@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:54:09 +0200 Subject: [PATCH 09/11] Added wrapMode to the outputMessageArea --- source/FifthGeneratedTuner.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/source/FifthGeneratedTuner.qml b/source/FifthGeneratedTuner.qml index 505c653..8eb50a1 100644 --- a/source/FifthGeneratedTuner.qml +++ b/source/FifthGeneratedTuner.qml @@ -828,6 +828,7 @@ MuseScore text: ""; font.family: monospacedFont; readOnly: true; + wrapMode: TextEdit.Wrap; width: 400; height: 50; } From f39d42c21a2917c8d426f488467749cbb007940d Mon Sep 17 00:00:00 2001 From: Alessandro Culatti <99362337+looptailG@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:59:46 +0200 Subject: [PATCH 10/11] Centered horizontally the tuning presets --- source/FifthGeneratedTuner.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/FifthGeneratedTuner.qml b/source/FifthGeneratedTuner.qml index 8eb50a1..5fed076 100644 --- a/source/FifthGeneratedTuner.qml +++ b/source/FifthGeneratedTuner.qml @@ -440,7 +440,8 @@ MuseScore Row { - spacing: 50; + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 5 * padding; Column { From c335eab5ee77f0eca62a8c899adc66cc75378860 Mon Sep 17 00:00:00 2001 From: Alessandro Culatti <99362337+looptailG@users.noreply.github.com> Date: Sun, 13 Oct 2024 23:10:08 +0200 Subject: [PATCH 11/11] Made the fifth size dialog width dynamic --- source/FifthGeneratedTuner.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/FifthGeneratedTuner.qml b/source/FifthGeneratedTuner.qml index 5fed076..e923b21 100644 --- a/source/FifthGeneratedTuner.qml +++ b/source/FifthGeneratedTuner.qml @@ -84,7 +84,7 @@ MuseScore { id: fifthSizeDialogText; text: ""; - width: 460; + width: guiColumn.implicitWidth; wrapMode: Text.Wrap; } }