From 8311cb27d73a3e2948b3aa65fe6718cc6e5be5df 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: Sun, 13 Nov 2022 20:53:48 +0800 Subject: Default Home draft --- DefaultHomeStackView.ui.qml | 77 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 DefaultHomeStackView.ui.qml (limited to 'DefaultHomeStackView.ui.qml') diff --git a/DefaultHomeStackView.ui.qml b/DefaultHomeStackView.ui.qml new file mode 100644 index 0000000..0bd3d1a --- /dev/null +++ b/DefaultHomeStackView.ui.qml @@ -0,0 +1,77 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +StackView { + property alias grid: grid + + id: stack + initialItem: Item { + + GridView { + model: ListModel { + ListElement { + count: "10K" + bgColor: "#26f7c32e" + } + ListElement { + count: "200+" + bgColor: "#1a1d3b53" + } + ListElement { + count: "60K+" + bgColor: "#1a6f42c1" + } + ListElement { + count: "6K+" + bgColor: "#1a17a2b8" + } + } + + delegate: Rectangle { + color: bgColor + implicitWidth: label.width + implicitHeight: label.height + + FontLoader { + id: heebo + name: "Heebo" + source: "Heebo/Heebo-Bold.ttf" + } + + Label { + id: label + text: count + font { + family: heebo.name + pixelSize: 21 + } + } + } + + cellWidth: width < 576 ? stack.width : width < 768 + ? stack.width / 2 : width < 992 ? stack.width / 3 + : stack.width / 4 + cellHeight: cellWidth * 1.3 + anchors { + top: parent.top + left: parent.left + right: parent.right + } + height: 100 + } + + GridView { + id: grid + cellWidth: width < 576 ? stack.width : width < 768 + ? stack.width / 2 : width < 992 ? stack.width / 3 + : stack.width / 4 + cellHeight: cellWidth * 1.3 + anchors { + left: parent.left + right: parent.right + bottom: parent.bottom + } + height: parent.height - 100 + } + } +} -- cgit v1.2.3