From c938c15984f989a2ad58fcadf0a27307cde5eadb Mon Sep 17 00:00:00 2001 From: Yanis Dziki <yanis.dziki@ens-lyon.fr> Date: Fri, 11 Apr 2025 21:09:14 +0200 Subject: [PATCH] Comme on fait du design --- motus/GameWindow.qml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/motus/GameWindow.qml b/motus/GameWindow.qml index c12e87f..edc57a0 100644 --- a/motus/GameWindow.qml +++ b/motus/GameWindow.qml @@ -10,30 +10,41 @@ Item { color: "#ffffff" anchors.fill: parent + Clavier { + id: clavier + x: 225 + y: 594 + } + Grid { id: grid - columns: 5 + columns: 8 rows: 5 spacing: 5 + width: columns * 50 + (columns - 1) * spacing + height: rows * 50 + (rows - 1) * spacing + + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: clavier.top + anchors.bottomMargin: 100 // un petit espace entre la grille et le clavier Repeater { model: grid.columns * grid.rows + Rectangle { - id: cell width: 50 height: 50 color: "lightgray" border.color: "black" objectName: "cell_" + index % grid.columns + "_" + Math.floor(index / grid.columns) + + Text { + anchors.centerIn: parent + text: "_" // ou lettre dynamique + font.pixelSize: 24 + } } } } - - Clavier { - id: clavier - x: 225 - y: 594 - } } } - -- GitLab