aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2019-09-05 16:01:41 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2019-09-05 15:00:36 +0000
commita88fc5fa38df87cd9acdc2e5b006c4f5fff7943a (patch)
tree567ff5905b540a0618561ebae1abfacd4cdd7a09
parent6ae410754f583bafd77baa5a877e604e88a2f2de (diff)
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>
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml26
1 files changed, 26 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml
index 67e0cff45a..bf02e53803 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml
@@ -104,7 +104,19 @@ Rectangle {
anchors.right: parent.right
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 {
+ id: tab
title: backendValues.className.value
component: Column {
@@ -125,6 +137,13 @@ Rectangle {
active = false
active = true
}
+
+ property int loaderHeight: specificsTwo.item.height + tabView.extraHeight
+ onLoaderHeightChanged: tabView.specficsTwoHeight = loaderHeight
+
+ onLoaded: {
+ tabView.specficsTwoHeight = loaderHeight
+ }
}
Loader {
@@ -133,6 +152,13 @@ Rectangle {
id: specificsOne;
source: specificsUrl;
+
+ property int loaderHeight: specificsOne.item.height + tabView.extraHeight
+ onLoaderHeightChanged: tabView.specficsHeight = loaderHeight
+
+ onLoaded: {
+ tabView.specficsOneHeight = loaderHeight
+ }
}
}
}