summaryrefslogtreecommitdiff
path: root/src/controls/SplitView.qml
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2013-03-22 15:05:26 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-22 16:15:51 +0100
commitc16bb467502fa9192d0bc5e7fcd84b31d29b213d (patch)
treec3d4e88cb6566f15424201e6d36745bb8ad956a0 /src/controls/SplitView.qml
parentf4bc1825c943ff0c8130a49fe774d255fa5f86ab (diff)
downloadqtquickcontrols-c16bb467502fa9192d0bc5e7fcd84b31d29b213d.tar.gz
Rename properties Layout.{vertical}SizePolicy
..to Layout.fill{Width,Height} This property now takes a bool, which enables you to write Layout.fillWidth: true instead of Layout.horizontalSizePolicy: Layout.Expanding Change-Id: Icf2e0dc4757938489908b8997d6c4e80c8be1c50 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/SplitView.qml')
-rw-r--r--src/controls/SplitView.qml18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/controls/SplitView.qml b/src/controls/SplitView.qml
index 39b7d773..64a9430a 100644
--- a/src/controls/SplitView.qml
+++ b/src/controls/SplitView.qml
@@ -57,7 +57,7 @@ import QtQuick.Controls.Private 1.0 as Private
Being expanding means that the item will get all the remaining space when other
items have been laid out according to their own width and height.
By default, the last visible child of the SplitView will be expanding, but
- this can be changed by setting Layout.horizontalSizePolicy to \c Layout.Expanding.
+ this can be changed by setting Layout.fillWidth to \c true.
Since the expanding item will automatically be resized to fit the extra space, it
will ignore explicit assignments to width and height.
@@ -69,7 +69,7 @@ import QtQuick.Controls.Private 1.0 as Private
SplitView supports setting attached Layout properties on child items, which means that you
can control minimumWidth, minimumHeight, maximumWidth and maximumHeight (in addition
- to horizontalSizePolicy/verticalSizePolicy) for each child.
+ to fillWidth/fillHeight) for each child.
Example:
@@ -89,7 +89,7 @@ import QtQuick.Controls.Private 1.0 as Private
Rectangle {
id: centerItem
Layout.minimumWidth: 50
- Layout.horizontalSizePolicy: Layout.Expanding
+ Layout.fillWidth: true
color: "darkgray"
}
Rectangle {
@@ -182,8 +182,8 @@ Item {
item.Layout.maximumHeightChanged.connect(d.updateLayout)
item.Layout.minimumHeightChanged.connect(d.updateLayout)
item.visibleChanged.connect(d.updateExpandingIndex)
- item.Layout.horizontalSizePolicyChanged.connect(d.updateExpandingIndex)
- item.Layout.verticalSizePolicyChanged.connect(d.updateExpandingIndex)
+ item.Layout.fillWidthChanged.connect(d.updateExpandingIndex)
+ item.Layout.fillHeightChanged.connect(d.updateExpandingIndex)
}
d.updateLayoutGuard = false
@@ -194,9 +194,9 @@ Item {
{
if (!lastItem.visible)
return
- var policy = (root.orientation === Qt.Horizontal) ? "horizontalSizePolicy" : "verticalSizePolicy"
+ var policy = (root.orientation === Qt.Horizontal) ? "fillWidth" : "fillHeight"
for (var i=0; i<__items.length-1; ++i) {
- if (__items[i].Layout[policy] === Layout.Expanding)
+ if (__items[i].Layout[policy] === true)
break;
}
@@ -410,8 +410,8 @@ Item {
for (var i=0; i<splitterItems.children.length; ++i) {
var item = splitterItems.children[i];
item.visibleChanged.disconnect(d.updateExpandingIndex)
- item.Layout.horizontalSizePolicyChanged.disconnect(d.updateExpandingIndex)
- item.Layout.verticalSizePolicyChanged.disconnect(d.updateExpandingIndex)
+ item.Layout.fillWidthChanged.disconnect(d.updateExpandingIndex)
+ item.Layout.fillHeightChanged.disconnect(d.updateExpandingIndex)
}
}
}