From fbfd1ff47a46dd6a245d16933fa4e23765864240 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: Wed, 22 Mar 2023 10:44:17 +0800 Subject: Grids depends on body width --- Home/Default.ui.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Home') diff --git a/Home/Default.ui.qml b/Home/Default.ui.qml index 00fba84..041d13a 100644 --- a/Home/Default.ui.qml +++ b/Home/Default.ui.qml @@ -27,8 +27,8 @@ Flickable { GridLayout { id: banner - columns: width < 992 ? 1 : 2 - rows: width < 992 ? 2 : 1 + columns: body.width < 992 ? 1 : 2 + rows: body.width < 992 ? 2 : 1 Layout.leftMargin: -9 Layout.rightMargin: -9 Layout.bottomMargin: 48 @@ -150,14 +150,14 @@ Flickable { GridView { id: counter interactive: false - cellWidth: width < 576 ? width - : width < 1200 ? width / 2 + cellWidth: body.width < 576 ? width + : body.width < 1200 ? width / 2 : width / 4 cellHeight: 125.6 Layout.fillWidth: true - implicitHeight: width < 576 + implicitHeight: body.width < 576 ? cellHeight * count - : width < 1200 ? cellHeight * count / 2 + : body.width < 1200 ? cellHeight * count / 2 : cellHeight model: ListModel { -- cgit v1.2.3