diff options
-rw-r--r-- | MinimalGridStackView.ui.qml | 16 | ||||
-rw-r--r-- | MinimalGridView.ui.qml | 9 |
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 {} -} |