aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2014-04-15 14:54:53 +0200
committerThomas Hartmann <Thomas.Hartmann@digia.com>2014-04-22 11:20:22 +0200
commitd01be9da1d03ddddaec8f6e6766dc0a91124a07e (patch)
tree37764cfb53ded6cbfe8377bf33acce45ad28b010 /share
parent3cb00e1afec33843105179cd289bb2178cd735a4 (diff)
QmlDesigner.PropertyEditor: Adjust size of TabView
The size of a TabView does not adjust to its contents. We have to do this manually. The minimum size is defined by the LayoutSection. Task-number: QTCREATORBUG-12040 Change-Id: Icdf42cbc3788b3ce38b9cffdb0dc9afd15d32815 Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml21
1 files changed, 21 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml
index d8dfdbe26d..0c1fd68bd4 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml
@@ -158,6 +158,15 @@ Rectangle {
anchors.right: parent.right
frameVisible: false
+ id: tabView
+ height: Math.max(layoutSectionHeight, specficsHeight)
+
+ property int layoutSectionHeight
+ property int specficsOneHeight: 0
+ property int specficsTwoHeight: 0
+
+ property int specficsHeight: Math.max(specficsOneHeight, specficsTwoHeight)
+
Tab {
title: backendValues.className.value
@@ -178,6 +187,10 @@ Rectangle {
active = false
active = true
}
+
+ onLoaded: {
+ tabView.specficsTwoHeight = specificsTwo.item.height + 40
+ }
}
Loader {
@@ -186,6 +199,10 @@ Rectangle {
id: specificsOne;
source: specificsUrl;
+
+ onLoaded: {
+ tabView.specficsOneHeight = specificsOne.item.height + 40
+ }
}
}
}
@@ -197,6 +214,10 @@ Rectangle {
anchors.right: parent.right
LayoutSection {
+
+ Component.onCompleted: {
+ tabView.layoutSectionHeight = childrenRect.height
+ }
}
}
}