diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-06 18:34:27 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-06 18:34:27 +0800 |
commit | f7b940c5b116a3c3456a1c8334cffa3ae1663064 (patch) | |
tree | 5385a12c5954037adb0de3c76f3fcb31d6a40e9d | |
parent | 194c829ee7664e662c6e95a309c6313863aa34e6 (diff) |
Simplify tabs content stack height calc
-rw-r--r-- | HomeDefault.ui.qml | 9 |
1 files 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 |