From 6bca4ee97ae87b12943f920b287d1251d702f839 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: Sun, 19 Mar 2023 15:59:49 +0800 Subject: Tab contents' height depends on active tab --- Course/Detail/Classic/Content/Main.ui.qml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Course') diff --git a/Course/Detail/Classic/Content/Main.ui.qml b/Course/Detail/Classic/Content/Main.ui.qml index d7fe09e..a499b52 100644 --- a/Course/Detail/Classic/Content/Main.ui.qml +++ b/Course/Detail/Classic/Content/Main.ui.qml @@ -79,8 +79,18 @@ ColumnLayout { Layout.leftMargin: 25.6 Layout.rightMargin: 25.6 Layout.bottomMargin: 25.6 + Layout.preferredHeight: switch ( + currentIndex) { + case 0: + return overview.height; + case 2: + return instructor.height; + default: + return 0; + } ColumnLayout { + id: overview Label { text: qsTr("Course Description") @@ -109,7 +119,9 @@ ColumnLayout { Item {} - MainTabContents.Instructor {} + MainTabContents.Instructor { + id: instructor + } Item {} -- cgit v1.2.3