From c33b970adbb2e528857bfe103f8d1f37a2469392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sat, 25 Feb 2023 16:09:55 +0800 Subject: Remove mouse area from counter Counters aren't really clickable on Eduport. Mouse areas can still be added in the Qeduport using app. --- Counter.ui.qml | 7 ------- 1 file changed, 7 deletions(-) (limited to 'Counter.ui.qml') diff --git a/Counter.ui.qml b/Counter.ui.qml index e6e7318..86cff16 100644 --- a/Counter.ui.qml +++ b/Counter.ui.qml @@ -3,8 +3,6 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 Item { - property alias area: area - Rectangle { color: bgColor radius: 8 @@ -63,10 +61,5 @@ Item { } } } - - MouseArea { - id: area - anchors.fill: parent - } } } -- cgit v1.2.3 From 3c32b0b56902f62569e4074f6a69301c57a69f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sat, 25 Feb 2023 17:52:32 +0800 Subject: Make the counter content centered --- Counter.ui.qml | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'Counter.ui.qml') diff --git a/Counter.ui.qml b/Counter.ui.qml index 86cff16..f75b2ce 100644 --- a/Counter.ui.qml +++ b/Counter.ui.qml @@ -7,33 +7,35 @@ Item { color: bgColor radius: 8 anchors { - top: parent.top + fill: parent topMargin: 25.6 - left: parent.left leftMargin: 12.8 - right: parent.right rightMargin: 12.8 - bottom: parent.bottom } - RowLayout { + Item { anchors { - top: parent.top - topMargin: 25.6 - left: parent.left - leftMargin: 25.6 - right: parent.right - rightMargin: 25.6 - bottom: parent.bottom - bottomMargin: 25.6 + fill: parent + margins: 25.6 } Image { + id: image source: icon - sourceSize.height: parent.height + sourceSize.height: column.height * 3 / 4 + fillMode: Image.PreserveAspectFit + x: (parent.width - (width + column.width + 25.6)) / 2 + anchors.verticalCenter: parent.verticalCenter } ColumnLayout { + id: column + spacing: 0 + anchors { + left: image.right + leftMargin: 25.6 + } + FontLoader { id: bold source: "Heebo/Heebo-Bold.ttf" @@ -43,21 +45,25 @@ Item { text: count font { family: bold.name - pixelSize: 21 + pointSize: 20.1 + weight: Font.Bold } + Layout.fillWidth: true } FontLoader { id: medium - source: "Heebo/Heebo-Bold.ttf" + source: "Heebo/Heebo-Medium.ttf" } Label { text: title font { family: medium.name - pixelSize: 15 + pointSize: 15 + weight: Font.Medium } + Layout.fillWidth: true } } } -- cgit v1.2.3