From c6d43f54be74e284eeecf2d41c4c3ceeeeaa8091 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: Fri, 30 Sep 2022 09:56:00 +0800 Subject: 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. --- MinimalGridStackView.ui.qml | 16 ++++++++++++++++ MinimalGridView.ui.qml | 9 --------- 2 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 MinimalGridStackView.ui.qml delete mode 100644 MinimalGridView.ui.qml 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 {} -} -- cgit v1.2.3