diff --git a/src/activities/memory/MemoryCommon.qml b/src/activities/memory/MemoryCommon.qml --- a/src/activities/memory/MemoryCommon.qml +++ b/src/activities/memory/MemoryCommon.qml @@ -45,6 +45,8 @@ fillMode: Image.PreserveAspectCrop focus: true + property bool isVertical: background.width < background.height // To check vertical mode + signal start signal stop @@ -144,6 +146,7 @@ right: parent.right rightMargin: 2 * ApplicationInfo.ratio } + visible: !background.isVertical width: height * 0.83 height: bar.height * 1.2 @@ -160,9 +163,40 @@ } } + Rectangle { + id: verticalPlayer + visible: background.isVertical + anchors { + bottom: bar.bottom + right: parent.right + bottomMargin: 45 * ApplicationInfo.ratio + } + color: "#00a0e2" + + border { + color: "white" + width: 2 * ApplicationInfo.ratio + } + + radius: 2 * ApplicationInfo.ratio + width: height * (background.isVertical ? 1.5 : 2.5) + height: bar.height / 2 + + GCText { + id: verticalPlayerScore + anchors.centerIn: parent + color: "black" + font.bold: true + fontSize: mediumSize + style: Text.Outline + styleColor: "white" + text: items.playerScore + } + } + Image { id: tux - visible: activity.withTux + visible: activity.withTux && !background.isVertical source: 'qrc:/gcompris/src/activities/memory/resource/tux-teacher.svg' anchors { bottom: bar.bottom @@ -185,6 +219,37 @@ } } + Rectangle { + id: verticalTux + visible: activity.withTux && background.isVertical + anchors { + bottom: bar.bottom + right: parent.right + bottomMargin: 2 * ApplicationInfo.ratio + } + color: "#e2a000" + + border { + color: "white" + width: 2 * ApplicationInfo.ratio + } + + radius: 2 * ApplicationInfo.ratio + width: height * (background.isVertical ? 1.5 : 2.5) + height: bar.height / 2 + + GCText { + id: verticalTuxScore + anchors.centerIn: parent + color: "black" + font.bold: true + fontSize: mediumSize + style: Text.Outline + styleColor: "white" + text: items.tuxScore + } + } + Bonus { id: bonus interval: 2000