diff options
| author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2013-05-03 18:48:35 +0200 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-07 10:07:01 +0200 |
| commit | 95a02b769f5be8aba73bdf558023a6e9a73264f2 (patch) | |
| tree | bf6d8a094fee7099163de6d291872fd6e77d8767 /src/controls/SplitView.qml | |
| parent | a781a5e03d33e08efd694c02b7e7b423e4709789 (diff) | |
SplitView: update code to use 'clampedMinMax' function
This function was added in a previous patch, so reuse it
for already existing code.
Change-Id: Icd5daf195af7e249d4273bbc32a290bed5f0eaa5
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'src/controls/SplitView.qml')
| -rw-r--r-- | src/controls/SplitView.qml | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/controls/SplitView.qml b/src/controls/SplitView.qml index 40d166d89..7d013bddc 100644 --- a/src/controls/SplitView.qml +++ b/src/controls/SplitView.qml @@ -275,14 +275,7 @@ Item { for (var i=0; i<__items.length; ++i) { if (i !== d.expandingIndex) { var item = __items[i]; - if (item.Layout[maximum] !== undefined) { - if (item.Layout[maximum] >= 0 && item[d.size] > item.Layout[maximum]) - item[d.size] = item.Layout[maximum] - } - if (item.Layout[minimum] !== undefined) { - if (item[d.size] < item.Layout[minimum]) - item[d.size] = item.Layout[minimum] - } + item[d.size] = clampedMinMax(item[d.size], item.Layout[d.minimum], item.Layout[d.maximum]) } } |
