From f7b940c5b116a3c3456a1c8334cffa3ae1663064 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:34:27 +0800 Subject: Simplify tabs content stack height calc --- HomeDefault.ui.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/HomeDefault.ui.qml b/HomeDefault.ui.qml index 5a7a251..eb159f0 100644 --- a/HomeDefault.ui.qml +++ b/HomeDefault.ui.qml @@ -270,13 +270,14 @@ Flickable { StackLayout { currentIndex: tabs.currentIndex + readonly property real cardItemHeight: width * 1.6 Layout.preferredHeight: width < 576 - ? width * 1.6 * tabsContent.currentCount + ? cardItemHeight * tabsContent.currentCount : width < 768 - ? width / 2 * 1.6 * (tabsContent.currentCount + tabsContent.currentCount % 2) / 2 + ? cardItemHeight * (tabsContent.currentCount + tabsContent.currentCount % 2) / 4 : width < 992 - ? width / 3 * 1.6 * (tabsContent.currentCount + (tabsContent.currentCount + 1) % 3) / 3 - : width / 4 * 1.6 * (tabsContent.currentCount + (tabsContent.currentCount + 2) % 4) / 4 + ? cardItemHeight * (tabsContent.currentCount + (tabsContent.currentCount + 1) % 3) / 9 + : cardItemHeight * (tabsContent.currentCount + (tabsContent.currentCount + 2) % 4) / 16 Repeater { id: tabsContent -- cgit v1.2.3