forked from qt-creator/qt-creator
QmlDesigner: Add loader resize logic to QtObjectPane
Change-Id: I2eb82e075203f82aa90edfe2eb44abc026d45adc Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
@@ -104,7 +104,19 @@ Rectangle {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
frameVisible: false
|
frameVisible: false
|
||||||
|
|
||||||
|
id: tabView
|
||||||
|
height: Math.max(layoutSectionHeight, specficsHeight)
|
||||||
|
|
||||||
|
property int layoutSectionHeight: 400
|
||||||
|
property int specficsOneHeight: 0
|
||||||
|
property int specficsTwoHeight: 0
|
||||||
|
|
||||||
|
property int specficsHeight: Math.max(specficsOneHeight, specficsTwoHeight)
|
||||||
|
|
||||||
|
property int extraHeight: 40
|
||||||
|
|
||||||
Tab {
|
Tab {
|
||||||
|
id: tab
|
||||||
title: backendValues.className.value
|
title: backendValues.className.value
|
||||||
|
|
||||||
component: Column {
|
component: Column {
|
||||||
@@ -125,6 +137,13 @@ Rectangle {
|
|||||||
active = false
|
active = false
|
||||||
active = true
|
active = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property int loaderHeight: specificsTwo.item.height + tabView.extraHeight
|
||||||
|
onLoaderHeightChanged: tabView.specficsTwoHeight = loaderHeight
|
||||||
|
|
||||||
|
onLoaded: {
|
||||||
|
tabView.specficsTwoHeight = loaderHeight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
@@ -133,6 +152,13 @@ Rectangle {
|
|||||||
|
|
||||||
id: specificsOne;
|
id: specificsOne;
|
||||||
source: specificsUrl;
|
source: specificsUrl;
|
||||||
|
|
||||||
|
property int loaderHeight: specificsOne.item.height + tabView.extraHeight
|
||||||
|
onLoaderHeightChanged: tabView.specficsHeight = loaderHeight
|
||||||
|
|
||||||
|
onLoaded: {
|
||||||
|
tabView.specficsOneHeight = loaderHeight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user