summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-02-16 19:58:19 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-02-16 19:58:19 +0800
commit1d6a7de22d9a1a1146f034382f3529eafcae1fe2 (patch)
treee1c46909ca10a5affdf8ff2c3f579799066542d3
parenta5fe5804373b27d383eb9c0b1a84e2ec030f506b (diff)
Put the grid inside a swipe view
-rw-r--r--HomeDefault.ui.qml38
1 files 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
+ }
}
}
}