From 9d48a9bb40b9bd2117fdffadc8c1593e54b3e79b 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: Mon, 14 Nov 2022 20:28:43 +0800 Subject: Remove dependency on stack (width) Comparison can be done to the grid's own width. --- DefaultHomeStackView.ui.qml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/DefaultHomeStackView.ui.qml b/DefaultHomeStackView.ui.qml index dcfd080..4113bd8 100644 --- a/DefaultHomeStackView.ui.qml +++ b/DefaultHomeStackView.ui.qml @@ -4,7 +4,6 @@ import QtQuick.Controls 2.15 StackView { property alias grid: grid - id: stack initialItem: Item { GridView { @@ -61,9 +60,8 @@ StackView { } } - cellWidth: width < 576 ? stack.width : width < 768 - ? stack.width / 2 : width < 992 ? stack.width / 3 - : stack.width / 4 + cellWidth: width < 576 ? width : width < 768 ? width / 2 + : width < 992 ? width / 3 : width / 4 cellHeight: cellWidth * 1.3 anchors { top: parent.top @@ -75,9 +73,8 @@ StackView { GridView { id: grid - cellWidth: width < 576 ? stack.width : width < 768 - ? stack.width / 2 : width < 992 ? stack.width / 3 - : stack.width / 4 + cellWidth: width < 576 ? width : width < 768 ? width / 2 + : width < 992 ? width / 3 : width / 4 cellHeight: cellWidth * 1.3 anchors { left: parent.left -- cgit v1.2.3