summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-30 09:56:00 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-30 09:56:00 +0800
commitc6d43f54be74e284eeecf2d41c4c3ceeeeaa8091 (patch)
tree549f068978c93e3ed8657de9a3c52b5674d43ba3
parentaf9b8eb4dc009352764bb395f2ed40506da45d9d (diff)
Now the grid view is inside a stack view
For now it's assumed that all applications would want to go to the detail view by having it stacked on the list/grid.
-rw-r--r--MinimalGridStackView.ui.qml16
-rw-r--r--MinimalGridView.ui.qml9
2 files changed, 16 insertions, 9 deletions
diff --git a/MinimalGridStackView.ui.qml b/MinimalGridStackView.ui.qml
new file mode 100644
index 0000000..860e37c
--- /dev/null
+++ b/MinimalGridStackView.ui.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+
+StackView {
+ property alias grid: grid
+
+ id: stack
+ initialItem: 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
+ ScrollBar.vertical: ScrollBar {}
+ }
+}
diff --git a/MinimalGridView.ui.qml b/MinimalGridView.ui.qml
deleted file mode 100644
index 5956957..0000000
--- a/MinimalGridView.ui.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 2.15
-import QtQuick.Controls 2.15
-
-GridView {
- cellWidth: width < 576 ? parent.width : width < 768 ? parent.width / 2
- : width < 992 ? parent.width / 3 : parent.width / 4
- cellHeight: cellWidth * 1.3
- ScrollBar.vertical: ScrollBar {}
-}