QmlDesigner: Set height according to active tab

* Add binding to current tab height
* Remove unused specficsOneHeight statement

Task-number: QDS-2051
Change-Id: Ia1ac6af4e65d3de5e1db96f2bcc2d1ec8eb08312
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2020-06-29 12:01:15 +02:00
committed by Henning Gründl
parent f1a5939e86
commit ddde374b40

View File

@@ -325,12 +325,10 @@ Rectangle {
frameVisible: false frameVisible: false
id: tabView id: tabView
height: Math.max(layoutSectionHeight, specficsHeight, advancedHeight) + extraHeight
property int advancedHeight: 0 height: currentHeight + extraHeight
property int layoutSectionHeight: 0
property int specficsHeight: 0
property int currentHeight: getTab(currentIndex).item.implicitHeight
property int extraHeight: 40 property int extraHeight: 40
Tab { Tab {
@@ -340,8 +338,6 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
onImplicitHeightChanged: tabView.specficsHeight = implicitHeight
Loader { Loader {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
@@ -366,11 +362,6 @@ Rectangle {
source: specificsUrl; source: specificsUrl;
property int loaderHeight: specificsOne.item.height + tabView.extraHeight property int loaderHeight: specificsOne.item.height + tabView.extraHeight
onLoaderHeightChanged: tabView.specficsOneHeight = loaderHeight
onLoaded: {
tabView.specficsOneHeight = loaderHeight
}
} }
} }
} }
@@ -381,8 +372,6 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
onImplicitHeightChanged: tabView.layoutSectionHeight = implicitHeight
LayoutSection { LayoutSection {
} }
@@ -713,8 +702,6 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
onImplicitHeightChanged: tabView.advancedHeight = implicitHeight
AdvancedSection { AdvancedSection {
} }
LayerSection { LayerSection {