From 5612b8735799616b61aa406123bb1c6c2ce26822 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, 6 Mar 2023 18:57:02 +0800 Subject: Finally fix tabs stack height --- HomeDefault.ui.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/HomeDefault.ui.qml b/HomeDefault.ui.qml index eb159f0..1b9dfc9 100644 --- a/HomeDefault.ui.qml +++ b/HomeDefault.ui.qml @@ -270,14 +270,14 @@ Flickable { StackLayout { currentIndex: tabs.currentIndex - readonly property real cardItemHeight: width * 1.6 + property real preservedAspectHeight: width * 1.6 Layout.preferredHeight: width < 576 - ? cardItemHeight * tabsContent.currentCount + ? preservedAspectHeight * tabsContent.currentCount : width < 768 - ? cardItemHeight * (tabsContent.currentCount + tabsContent.currentCount % 2) / 4 + ? preservedAspectHeight / 2 * Math.ceil(tabsContent.currentCount / 2) : width < 992 - ? cardItemHeight * (tabsContent.currentCount + (tabsContent.currentCount + 1) % 3) / 9 - : cardItemHeight * (tabsContent.currentCount + (tabsContent.currentCount + 2) % 4) / 16 + ? preservedAspectHeight / 3 * Math.ceil(tabsContent.currentCount / 3) + : preservedAspectHeight / 4 * Math.ceil(tabsContent.currentCount / 4) Repeater { id: tabsContent -- cgit v1.2.3