From 1d6a7de22d9a1a1146f034382f3529eafcae1fe2 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: Thu, 16 Feb 2023 19:58:19 +0800 Subject: Put the grid inside a swipe view --- HomeDefault.ui.qml | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/HomeDefault.ui.qml b/HomeDefault.ui.qml index be58d58..86b4ae5 100644 --- a/HomeDefault.ui.qml +++ b/HomeDefault.ui.qml @@ -174,26 +174,34 @@ Flickable { } } - GridView { - id: popular - interactive: false - cellWidth: width < 576 ? width - : width < 768 ? width / 2 - : width < 992 ? width / 3 - : width / 4 - cellHeight: cellWidth * 1.3 - height: width < 576 - ? cellHeight * count - : width < 768 - ? cellHeight * (count + count % 2) / 2 - : width < 992 - ? cellHeight * (count + (count + 1) % 3) / 3 - : cellHeight * (count + (count + 2) % 4) / 4 + SwipeView { anchors { top: counter.bottom left: parent.left right: parent.right } + height: popular.height + + GridView { + id: popular + interactive: false + cellWidth: width < 576 ? width + : width < 768 ? width / 2 + : width < 992 ? width / 3 + : width / 4 + cellHeight: cellWidth * 1.3 + width: parent.width + height: width < 576 + ? cellHeight * count + : width < 768 + ? cellHeight + * (count + count % 2) / 2 + : width < 992 + ? cellHeight + * (count + (count + 1) % 3) / 3 + : cellHeight + * (count + (count + 2) % 4) / 4 + } } } } -- cgit v1.2.3