From 41c89d26f4f56e1d1bdbfab53ba209f80887d60e 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: Tue, 15 Nov 2022 15:20:15 +0800 Subject: Rename Default Home file --- DefaultHome.ui.qml | 84 +++++++++++++++++++++++++++++++++++++++++++ DefaultHomeStackView.ui.qml | 87 --------------------------------------------- 2 files changed, 84 insertions(+), 87 deletions(-) create mode 100644 DefaultHome.ui.qml delete mode 100644 DefaultHomeStackView.ui.qml diff --git a/DefaultHome.ui.qml b/DefaultHome.ui.qml new file mode 100644 index 0000000..59d9735 --- /dev/null +++ b/DefaultHome.ui.qml @@ -0,0 +1,84 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +Item { + property alias popularCourseTabsContent: popularCourseTabsContent + + GridView { + id: counter + model: ListModel { + ListElement { + count: "10K" + bgColor: "#26f7c32e" + } + ListElement { + count: "200+" + bgColor: "#1a1d3b53" + } + ListElement { + count: "60K+" + bgColor: "#1a6f42c1" + } + ListElement { + count: "6K+" + bgColor: "#1a17a2b8" + } + } + + delegate: Item { + width: counter.cellWidth + height: 125.6 + Rectangle { + color: bgColor + radius: 8 + anchors { + top: parent.top + topMargin: 25.6 + left: parent.left + leftMargin: 12.8 + right: parent.right + rightMargin: 12.8 + bottom: parent.bottom + } + + FontLoader { + id: heebo + name: "Heebo" + source: "Heebo/Heebo-Bold.ttf" + } + + Label { + id: label + text: count + font { + family: heebo.name + pixelSize: 21 + } + } + } + } + + cellWidth: width < 576 ? width : width < 768 ? width / 2 + : width < 992 ? width / 3 : width / 4 + cellHeight: cellWidth * 1.3 + anchors { + top: parent.top + left: parent.left + right: parent.right + } + height: 100 + } + + GridView { + id: popularCourseTabsContent + cellWidth: width < 576 ? width : width < 768 ? width / 2 + : width < 992 ? width / 3 : width / 4 + cellHeight: cellWidth * 1.3 + anchors { + left: parent.left + right: parent.right + bottom: parent.bottom + } + height: parent.height - 100 + } +} diff --git a/DefaultHomeStackView.ui.qml b/DefaultHomeStackView.ui.qml deleted file mode 100644 index 2b84be7..0000000 --- a/DefaultHomeStackView.ui.qml +++ /dev/null @@ -1,87 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 - -StackView { - property alias popularCourseTabsContent: popularCourseTabsContent - - initialItem: Item { - - GridView { - id: counter - model: ListModel { - ListElement { - count: "10K" - bgColor: "#26f7c32e" - } - ListElement { - count: "200+" - bgColor: "#1a1d3b53" - } - ListElement { - count: "60K+" - bgColor: "#1a6f42c1" - } - ListElement { - count: "6K+" - bgColor: "#1a17a2b8" - } - } - - delegate: Item { - width: counter.cellWidth - height: 125.6 - Rectangle { - color: bgColor - radius: 8 - anchors { - top: parent.top - topMargin: 25.6 - left: parent.left - leftMargin: 12.8 - right: parent.right - rightMargin: 12.8 - bottom: parent.bottom - } - - FontLoader { - id: heebo - name: "Heebo" - source: "Heebo/Heebo-Bold.ttf" - } - - Label { - id: label - text: count - font { - family: heebo.name - pixelSize: 21 - } - } - } - } - - cellWidth: width < 576 ? width : width < 768 ? width / 2 - : width < 992 ? width / 3 : width / 4 - cellHeight: cellWidth * 1.3 - anchors { - top: parent.top - left: parent.left - right: parent.right - } - height: 100 - } - - GridView { - id: popularCourseTabsContent - cellWidth: width < 576 ? width : width < 768 ? width / 2 - : width < 992 ? width / 3 : width / 4 - cellHeight: cellWidth * 1.3 - anchors { - left: parent.left - right: parent.right - bottom: parent.bottom - } - height: parent.height - 100 - } - } -} -- cgit v1.2.3