From b0b4d2f50f1eb05e82a20e6ea1e77f8a75933130 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 17 Feb 2024 18:25:15 +0100 Subject: [PATCH] style(qml): Improve readability of pre-/postroll drawing code --- res/qml/WaveformRow.qml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/res/qml/WaveformRow.qml b/res/qml/WaveformRow.qml index 81e7cd1659d0..6a37bef69b10 100644 --- a/res/qml/WaveformRow.qml +++ b/res/qml/WaveformRow.qml @@ -151,7 +151,12 @@ Item { paths: { let p = []; for (let i = 0; i < preroll.numTriangles; i++) { - p.push([Qt.point(preroll.width - i * preroll.triangleWidth, preroll.triangleHeight / 2), Qt.point(preroll.width - (i + 1) * preroll.triangleWidth, 0), Qt.point(preroll.width - (i + 1) * preroll.triangleWidth, preroll.triangleHeight), Qt.point(preroll.width - i * preroll.triangleWidth, preroll.triangleHeight / 2)]); + p.push([ + Qt.point(preroll.width - i * preroll.triangleWidth, preroll.triangleHeight / 2), + Qt.point(preroll.width - (i + 1) * preroll.triangleWidth, 0), + Qt.point(preroll.width - (i + 1) * preroll.triangleWidth, preroll.triangleHeight), + Qt.point(preroll.width - i * preroll.triangleWidth, preroll.triangleHeight / 2), + ]); } return p; } @@ -180,7 +185,12 @@ Item { paths: { let p = []; for (let i = 0; i < postroll.numTriangles; i++) { - p.push([Qt.point(i * postroll.triangleWidth, postroll.triangleHeight / 2), Qt.point((i + 1) * postroll.triangleWidth, 0), Qt.point((i + 1) * postroll.triangleWidth, postroll.triangleHeight), Qt.point(i * postroll.triangleWidth, postroll.triangleHeight / 2)]); + p.push([ + Qt.point(i * postroll.triangleWidth, postroll.triangleHeight / 2), + Qt.point((i + 1) * postroll.triangleWidth, 0), + Qt.point((i + 1) * postroll.triangleWidth, postroll.triangleHeight), + Qt.point(i * postroll.triangleWidth, postroll.triangleHeight / 2), + ]); } return p; }