summaryrefslogtreecommitdiffstats
path: root/src/controls/SplitView.qml
Commit message (Collapse)AuthorAgeFilesLines
* SplitView: fix hidden item after fillWidth item bugold/5.1Richard Moe Gustavsen2013-09-191-11/+12
| | | | | | | | | | | | | | | | Some of the calculations in SplitView assumed that if item with index i was hidden, then so was handle at index i as well. This is not correct. The reason is that a the handle at i belongs to either item i or item i+1, depending on where the fillWidth item is. And this caused a bug when hiding the item to the right of the fillWidth item. Conflicts: tests/auto/controls/data/tst_splitview.qml Change-Id: I59967813f264a856181c57e32c4820d09d7eb363 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* SplitView: bugfix animating split itemsRichard Moe Gustavsen2013-07-111-1/+3
| | | | | | | | | Only assign a new width/height to a splitter item when needed (that is, the value was clamped). Otherwise we just end up breaking bindings and animations without a good reason. Change-Id: Ic33007713f6450d52c9f5bd958fca74095413638 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* SplitView: Always layout as if fillWidthItem is visibleRichard Moe Gustavsen2013-07-111-6/+6
| | | | | | | | | | | | | | | Hiding the fillWidth item in the splitter is allowed, but causes strange drawing/layout artifacts that can be difficult to understand since the layout engine would ignore all hidden items. This patch changes the implementation by adding an exception to the rule. The layout engine now treats the fillWidth item as if it is always visible. Then, hiding it would just reveal a white field where the fillItem would otherwise be, but the layout would otherwise look correct. Change-Id: I95ec51b595109e8f1efdc231c9a6697ee60aa483 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* SplitView: bugfix hiding splitter for last itemRichard Moe Gustavsen2013-07-111-3/+3
| | | | | Change-Id: I8953d7fa4f1a1a940029270d4cb8f3d69da07bf7 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* SplitView: support changing orientationRichard Moe Gustavsen2013-07-111-1/+35
| | | | | Change-Id: I8a5f7ec5bd6315a8a74ac6f8b5c9bc0d0f9c19fa Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-251-2/+0
|\ | | | | | | Change-Id: I1684510ce4f1b52e3569d8c04e272b1c8fd63c1a
| * Doc: Small fix for SplitViewCaroline Chao2013-06-241-2/+0
| | | | | | | | | | | | | | | | | | SplitView items must set width/height and not Layout.preferredWidth/Layout.preferredHeight. Change-Id: Ice888d51c63cbdaf6e0e235c0c7569c4a8794b7d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Doc: Add note to import QtQuick.Layouts when using SplitViewCaroline Chao2013-06-251-0/+3
|/ | | | | | | | | | In order to use the Layout attached properties. Task-number: QTBUG-31968 Change-Id: I00880b6a4ac91532db5da513d13757949fae64c2 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Doc: Fixes warningsCaroline Chao2013-06-031-4/+4
| | | | | | | | | | | Fixes issues including: - Misspelled links - Links to signal with arguments - \table in SplitView.qml - Links to current file Change-Id: I2cbadf661a641f19ed55f6854922b2b69966bc9c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Docs: fix missing/leftover docs, types, tags...J-P Nurmi2013-05-301-6/+17
| | | | | | Task-number: QTBUG-31262 Change-Id: I6bf48604b9392a2a9c63c344363188a4693a8547 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Consistent use of "hovered" and style API conventionsJens Bache-Wiig2013-05-291-22/+28
| | | | | | | | | | | We were still using "containsMouse" in a few places, and we should consistently add "hovered" to all button types for consistency. Also fixed the SplitView to follow the new style conventions. Change-Id: Iebc333c0cecc5bcde27e626b1a611c2f2edcf7dc Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Revert "Revert "Remove unneeded checks for -1 (infinity) in SplitView""Jan Arve Saether2013-05-161-4/+3
| | | | | | | | | This reverts commit a454ff7f445f50f86e947d9a7e528f36ca0e3c5e. This patch should follow patch 91fc9b1823c0a95190005f3baaa4aa227 Change-Id: I5e26da1d967f8880d73e32ad5a76c59bedf7a065 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Revert "Remove unneeded checks for -1 (infinity) in SplitView"v5.1.0-beta1Jens Bache-Wiig2013-05-111-3/+4
| | | | | | | | | This reverts commit c5270bdb7261deaeed13c49ba8b4c17825b5619b Since we reverted Change Ia638064f: Return infinity instead of -1 as a default value for max sizes, we have to revert this one as it depends on it. Change-Id: I765b67ac7c77074bbcf75fd3010d146d2e00a0b0 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Remove unneeded checks for -1 (infinity) in SplitViewJan Arve Saether2013-05-101-4/+3
| | | | | | | | | | | With commit 16558ac71509fe51a4cf18f238e4f61b37323fe4 Layout.maximumWidth and Layout.maximumHeight now returns Number.POSITIVE_INFINITY instead of -1. As described in that commit, comparisons against those properties does not need any special handling for -1 anymore. Change-Id: I8d4bba0fa87f9c67ac30dd40a8be8cb99abba283 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* SplitView: always respect min/maxRichard Moe Gustavsen2013-05-071-3/+6
| | | | | | | | | | | | | If the user sets Layout.maximumWidth on the fillWidth item, we now respect it. This can potentially make the splitview look buggy, since the fillWidth item might then be restrained from filling out remaining space. The same with the height of each item; you can now control the maximum height. This means that each item can end up with a different height. The upshot is that if you add items to a splitview that cannot grow, splitview will not try to resize it. Change-Id: If1cc82aefa939898a3b159da6b006f95af42599f Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* SplitView: rename 'expanding' to 'fillWidth'Richard Moe Gustavsen2013-05-071-34/+34
| | | | | | | | Rename variables to the new Layout terminology, to ease future maintenance/understanding of the code. Change-Id: I619f62a0280238fafefe261fae3f00eb575bb699 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* SplitView: update code to use 'clampedMinMax' functionRichard Moe Gustavsen2013-05-071-8/+1
| | | | | | | | 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>
* SplitView: calculate implicit sizeRichard Moe Gustavsen2013-05-071-24/+50
| | | | | | | | Set the implicit size of the SplitView based on the sizes of the split items. Change-Id: I775b938215216831d10cb50868e4c6733e157eeb Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Doc: correct for compliancy with Writing GuidelinesNico Vertriest2013-05-071-0/+1
| | | | | | | | Task-number: QTBUG-30318 Change-Id: If3916f3250f202a5da4b1f8034ecfba984367af3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Do not clamp to Layout.maximum{Width,Height} if its -1Jan Arve Saether2013-04-181-1/+1
| | | | | | | This regressed due to 2ed163c6c6cb85b946b4166b3136d43336ff7adf Change-Id: Ib566dec33dad2f5dad5894ff94bd5ce09ecd515a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Cleanup the superfluous \internal tags that are no longer neededJ-P Nurmi2013-04-081-2/+0
| | | | | Change-Id: I2eaaf7e82351e70a742eeadc32b8e1f8655a02c1 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Doc: minor language editsNico Vertriest2013-04-051-14/+15
| | | | | | | | | | | | | Concerning vocab., punctuation, syntax and/or Writing Guidelines. Corrected whitespace issues. Replaced "if" with "whether" in Slider.qml Task-number: QTBUG-30318 Change-Id: I0e0e8d2b807f0a6534deb2caa6dbee7eb206f43b Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Rename properties Layout.{vertical}SizePolicyJan Arve Saether2013-03-221-9/+9
| | | | | | | | | | | | | ..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>
* SplitView: add property 'resizing'Richard Moe Gustavsen2013-03-141-2/+9
| | | | | | | | This will be set to 'true' when any of the splitter handles are being dragged Change-Id: I715f8107ff1844b97df27d649f2d48785476adf9 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Change imports from QtQuick 2.0 to QtQuick 2.1Caroline Chao2013-03-141-1/+1
| | | | | | Change-Id: If9df032c76e36f385aacd30cc31d6f02574c6f11 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* SplitView: Disconnect items connections on destructionCaroline Chao2013-03-131-0/+9
| | | | | | | | Those connections are sometimes called after the SplitView has been destructed and it causes warnings (i.e. tst_splitview autotests). Change-Id: I42ae333e72c01edba78f69bb1e9de8b4f85dea2c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Fix incorrect size reported for SplitViewJens Bache-Wiig2013-03-131-0/+1
| | | | | | | | | | Found this bug while replicating the Creator layout. Aparently the content item is the parent of children so it should fill the contents of the SplitView, otherwise it will report a width and height of 0. Change-Id: I47a8e6cbecf8642e2d133a0be0dce0305a167c0c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Doc: Add SplitView to the ingroup viewsCaroline Chao2013-03-071-0/+1
| | | | | Change-Id: Ifa95b8db73b78c3b46d7d18bc55aa06d2569c89e Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Change the layout engine of RowLayout and ColumnLayout.Jan Arve Saether2013-03-061-0/+1
| | | | | | | | | It now uses the gridlayoutengine from graphicsview, which also gives us a well tested grid layout engine almost for free. Change-Id: I939ae4d2b321c8079935ff3374e8e5d10d02384b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* SplitView: Fix bug when showing SplitView lateRichard Moe Gustavsen2013-03-011-56/+47
| | | | | | | | | If the SplitView was initially hidden, and told to show later, the handles ended up at wrong positions. This patch will fix this. Change-Id: Ia21fa1efcf30c36bf18e0d4f3ab0813c6b79afcc Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Make containsMouse property private.Mitch Curtis2013-02-261-1/+0
| | | | | | | | | | | Also removes the RangeTab from the Gallery example, since its controls use containsMouse and are no longer different from the same set of sliders on the control tab. Adding MouseAreas to each control in RangeTab to achieve the same animation would clutter the example with boilerplate code. Change-Id: I80d6f3bbf1b73229f4d0ae99dd2a65bc083e7099 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Update SplitView docsJ-P Nurmi2013-02-251-69/+76
| | | | | | | Most of the documentation was there already, just not using proper qdoc format. Change-Id: Ia28a0da3b20151202cafdbc1b535a1921a48b1a6 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Rename Splitter to SplitViewJ-P Nurmi2013-02-221-0/+401
Change-Id: I1db05195ada0b798a632da04fb256f030c894560 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>