diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-06 18:57:02 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-06 18:57:02 +0800 |
commit | 5612b8735799616b61aa406123bb1c6c2ce26822 (patch) | |
tree | 3b22e641f4d5a206d6686d18976dc2ca8809fd51 | |
parent | f7b940c5b116a3c3456a1c8334cffa3ae1663064 (diff) |
Finally fix tabs stack height
-rw-r--r-- | HomeDefault.ui.qml | 10 |
1 files 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 |