summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@theqtcompany.com>2015-02-02 14:14:50 +0100
committerJan Arve Sæther <jan-arve.saether@theqtcompany.com>2015-02-02 13:45:05 +0000
commit6d6cace9ee25fb96fed91321ddb0e99652676823 (patch)
treef6b4b6a17cc8bad5eb403ac9e59241da5acff23a /src
parente7fc6186be4700565505ef890c53dbe3d22ba3f4 (diff)
downloadqtquickcontrols-6d6cace9ee25fb96fed91321ddb0e99652676823.tar.gz
Fix wrong calculation of "other" margins in splitview
The code was quite bogus, as it accessed item, which already was out of scope. The code should evaluate the "other" margin for each iteration in the loop, similar to how its evaluated for implicitWidth. Change-Id: I1e58b1f1ac8296ece550d1af173280ceb2fa2f8b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/controls/SplitView.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controls/SplitView.qml b/src/controls/SplitView.qml
index 45f8026e..7053ce41 100644
--- a/src/controls/SplitView.qml
+++ b/src/controls/SplitView.qml
@@ -321,7 +321,7 @@ Item {
for (var i=0; i<__items.length; ++i) {
var item = __items[i];
implicitSize += clampedMinMax(item[d.size], item.Layout[minimum], item.Layout[maximum]) + extraMarginSize(item)
- var os = clampedMinMax(item[otherSize], item.Layout[otherMinimum], item.Layout[otherMaximum])
+ var os = clampedMinMax(item[otherSize], item.Layout[otherMinimum], item.Layout[otherMaximum]) + extraMarginSize(item, true)
implicitOtherSize = Math.max(implicitOtherSize, os)
var handle = __handles[i]
@@ -330,7 +330,7 @@ Item {
}
root[d.implicitSize] = implicitSize
- root[d.implicitOtherSize] = implicitOtherSize + extraMarginSize(item, true)
+ root[d.implicitOtherSize] = implicitOtherSize
}
function clampedMinMax(value, minimum, maximum)