summaryrefslogtreecommitdiffstats
path: root/src/layouts
Commit message (Collapse)AuthorAgeFilesLines
* Move Qt Quick Layouts to qtdeclarative repoJan Arve Saether2016-02-2623-3970/+0
| | | | | Change-Id: Ia82322488e804ba40d4c91d0bc7e6431ebe973be Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Unify license header usageAntti Kokko2016-02-044-20/+20
| | | | | | | Updated FDL license headers Change-Id: I867e7f1cb551f2141a4344d505bbf5d694df4720 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Unify license header usageAntti Kokko2016-02-0411-132/+165
| | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I3c851bc24da89f6300b94199387d1adf16ca4f48 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-212-156/+2
|\ | | | | | | | | | | | | Conflicts: src/controls/qquickmenubar.cpp Change-Id: I4b036212b6dadded2c4d60dd07e91f629e80d9c2
| * Layouts: Remove redundant definition of QQuickItemAlessandro Portale2016-01-061-154/+0
| | | | | | | | | | | | | | Seems to create a race condition in Qt Creator's code model Change-Id: Id685e14614db3c881114b1fea6083569b02e4307 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
| * Doc: Update QtQuick.Layouts import version to 1.3Topi Reinio2016-01-041-2/+2
| | | | | | | | | | | | Task-number: QTBUG-50000 Change-Id: I50fdce82e7a1e987c9216bba52e55e5e995b2f77 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* | Replace foreach with range-based forAnton Kudryavtsev2016-01-162-6/+11
| | | | | | | | | | Change-Id: Ieb9019b62696479a4e0317a590bceaeb30abf62c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-021-1/+170
|\| | | | | | | | | | | | | Conflicts: tests/auto/controls/data/tst_menubar.qml Change-Id: I23c3299e6f6cef14093aa4f79b3e7d769c063064
| * Update plugins.qmltypesKai Koehne2015-11-191-1/+170
| | | | | | | | | | | | | | Change-Id: Iae6420d4e0f0f1ef374cce4ab91101e3b04af6bf Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-052-28/+25
|\| | | | | | | Change-Id: I5d230ebc7c3646fce983cb21892cc3ce42854256
| * Fix {Row|Grid}Layout to adhere to sibling order of its childrenJan Arve Saether2015-10-302-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | In order to reduce the number of temporary calls to updateLayoutItems, I should postpone it until the item is completed. This will be a separate patch. This is a backport of change 59f7b30d41b06b1d9da81aea5784d57ecd91ab04 Change-Id: Iee495ee3d85a03407b06d06d8076c5c63d3d20cf Task-number: QTBUG-45152 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
| * Avoid redundant relayout when adding or removing itemsUlf Hermann2015-10-231-4/+0
| | | | | | | | | | | | | | QQuickLayout::itemChange() already takes care of this. Change-Id: I2f8e81f6797de7c533c36730e55a97bedfdddd92 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * Tidy up Layout documentationMitch Curtis2015-10-201-24/+25
| | | | | | | | | | Change-Id: Ibbf6237b36d3713b478720addd4ea86a875bd88e Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-251-5/+5
|\| | | | | | | Change-Id: Id85e82801b77faf9a32177838025696aab64f002
| * Fix a few issues in StackLayout documentation.Mitch Curtis2015-09-071-5/+5
| | | | | | | | | | Change-Id: I5a9a5b020cee4f8e3e86b40b23d2ecbd879e9e7a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Fix {Row|Grid}Layout to adhere to sibling order of its childrenJan Arve Saether2015-09-212-1/+19
|/ | | | | | | | | | In order to reduce the number of temporary calls to updateLayoutItems, I should postpone it until the item is completed. This will be a separate patch. Change-Id: I3f78c4463a815862139f43ef685c38b40139001c Task-number: QTBUG-45152 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Improve distribution when snapping to the pixel grid.Jan Arve Saether2015-04-152-5/+4
| | | | | | | | | | | | | | | The pixel snapping could sometimes cause gaps/spacings between items sometimes got 1 pixel too wide. This wasn't too much of an issue when it varied between 6/7 pixels, but was of course quite noticeable when the spacing was supposed to be 0 pixels. The layout engine has been updated to take care of this, and this patch will remove the old "snap to pixel grid" patches, and instead use new the functionality provided by the engine Task-number: QTBUG-41216 Change-Id: If1f473c350370fca0ed9dff5ff6aa9c2c442c293 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Say hello to StackLayoutJan Arve Saether2015-04-135-3/+442
| | | | | | Task-number: QTBUG-44077 Change-Id: I85dadc0950617728bca83d5c72ed5a086352b57d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-03-232-5/+5
|\ | | | | | | | | | | | | Conflicts: src/layouts/qquicklinearlayout_p.h Change-Id: I6a1777e5d097790edbd442058f12bea0ba337d65
| * Fix inconsistent overrides. [-Winconsistent-missing-override]Sergio Martins2015-03-222-6/+6
| | | | | | | | | | Change-Id: Ib258b56ba7b081c9298b23c814d3b2e4e71258cc Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Refactor: Move some common code up to QQuickLayoutJan Arve Saether2015-03-056-335/+360
|/ | | | | | | | | | | | | | This should make them available to other types of layouts, such as StackLayout * geometryChanged() is now reimplemented in QQuickLayout, and will call the virtual rearrange() * As a consequence, isReady() is also moved up to QQuickLayout * invalidateSenderItem() is moved up * Moved some of the itemChange() code up Change-Id: I7388ff648f70ba20a1f944485724a28249524848 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devJ-P Nurmi2015-02-122-0/+26
|\ | | | | | | | | | | | | | | Conflicts: src/controls/TableView.qml tests/auto/controls/data/tst_gridlayout.qml Change-Id: I030bc50dc8fcf7b6b00e183dc3a67c3cd012f3fb
| * Fix crash when invalidating a layout while rearrangingDaiwei Li2015-02-052-0/+26
| | | | | | | | | | | | | | | | | | | | Queue the invalidations and upates while rearranging and apply them after. If we do them during, we can delete the items being arranged, leading to a crash. Change-Id: Ic3fe25c52afd1c8d36644f3cf7e3377ba3bec9c1 Task-number: QTBUG-44139 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Layouts: update license headersJ-P Nurmi2015-02-119-135/+163
| | | | | | | | | | Change-Id: I1afa494332cd96d723c1a61250d177c39440beaa Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | Docs: update license headersJ-P Nurmi2015-02-114-48/+35
| | | | | | | | | | | | Change-Id: I2c181d880e88c16a169c87b9260423db093d9ce8 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | Add support for Layout marginsJan Arve Saether2015-01-1610-12/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the way to achieve this is to make a proxy item in a layout: RowLayout { Item { Text { anchors.fill: parent anchors.margins: 9 } } } using Layout margins you can now skip the proxy item and instead write: RowLayout { Text { Layout.margins: 9 } } Note that this is not the same as margins in the QLayout world, as this only controls the margins between the layout container and its items. This feature adds margins to each individual item inside the layout The real logic is done by the container classes: Layouts has the additional logic to adhere to them. SplitView will be done in a separate commit. Task-number: QTBUG-39724 Task-number: QTBUG-41559 Change-Id: I9c5c2a1e0ee43c1200b62009216c9f64d2875baf Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devJ-P Nurmi2015-01-161-2/+9
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/controls/data/tst_stackview.qml Change-Id: I54b55d51452e812315f97bcdfd1a8e361a427f56
| * Layouts: increase the default spacing on mobile platformsJ-P Nurmi2014-10-301-2/+9
| | | | | | | | | | | | Change-Id: I7aff0236a08465c05559bd8a2e8a60b556fbc4ba Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Fix build with latest qtbaseKai Koehne2015-01-081-2/+2
| | | | | | | | | | | | | | QT_NO_QWARNING_MACRO got removed in favor of QT_NO_QDEBUG_MACRO. Change-Id: Iadae92933921191fe1e1c736b9fb3798eca63472 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-09-1910-176/+106
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/controls/Styles/iOS/ComboBoxStyle.qml src/controls/Styles/iOS/SpinBoxStyle.qml src/controls/Styles/iOS/TextAreaStyle.qml src/controls/Styles/iOS/TextFieldStyle.qml src/controls/Styles/iOS/iOS.pro Change-Id: Ib31ead16807a952a39aaa611b27ad89d4f86c60c
| * Adding designersupported to pluginsThomas Hartmann2014-09-181-0/+1
| | | | | | | | | | | | | | | | This patch adds designersupported to the plugins supported by QtQuick Designer. Change-Id: I021bdeab6ef1e29d5ffd7e1e95b296217aaf10eb Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
| * Fix Layout.minimumWidth documentationGatis Paeglis2014-09-171-1/+1
| | | | | | | | | | Change-Id: I5472ee9b906a46bd665002a0e468f22762957ee1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Do not crash when removing children from hidden layoutsJan Arve Saether2014-09-031-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the proxy items (QQuickGridLayoutItem) that was added to the layout was not removed when a child item got deleted from a hidden layout. The proxy item therefore ended up having a dangling pointer to the deleted item. The solution is to also update the layout with a new list of items even when the layout is hidden. This will also fix a problem with that size hints was not correct when layouts were hidden. Note that the test included has an expected failure. This is because the case it tests is not very common and the problem is shared with positioners. The problem stems from the fact that a layouts implicit size should change when a child item is changed from implicitly hidden to explicitly hidden. Unfortuntately, QQuickItem does not notify about such changes. This is a problem independent of this crash patch fix, and I would like to address that in a separate commit. Change-Id: I67ac28b9d08208432559622c9cd412e24b197b32 Task-number: QTBUG-39045 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Update license headers and add new license filesAntti Kokko2014-08-259-171/+99
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I470909ba0980db33ab551790d619c59a35978590 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Remove unused function.Jan Arve Saether2014-08-272-12/+0
|/ | | | | Change-Id: I6a91356aa98e44e8ac9c5fea4b7ff2ed09f137b9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Doc: Removing url variable from qdocconf file.Jerome Pasion2014-07-071-1/+0
| | | | | | | -url inherited from the url variable set in qtbase/doc/global Change-Id: Iaf9a7530c163a6a334c80c9e8ef2b1fbbb2b1981 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-06-255-11/+79
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Styles/Desktop/SpinBoxStyle.qml Change-Id: Ia501c1388a2af9f273ec2742abbfc766717ad9e6
| * Fix grammar in Layout::fillWidth and Layout::fillHeight documentation.Mitch Curtis2014-06-201-2/+2
| | | | | | | | | | | | Change-Id: If6ef7eb6fe3f5f6f70b70dc4bc19678e0db18321 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Doc: Updated layouts docs with images and snippetsVenu2014-06-134-9/+77
| | | | | | | | | | | | | | | | | | | | | | | | The images and the corresponding snippets should help the reader understand the Quick Layouts better. Task-number: QTBUG-33799 Change-Id: I0a4831f33d99de87fcd7cb68a36844885509bb06 Sanity-Review: Qt Sanity Bot <qt_sanitybot@qt-project.org> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Doc: Fix qmlclass selector used in documentation configTopi Reinio2014-06-111-1/+1
|/ | | | | | | | | | A recent change (46959875) in qdoc raised QML types from subnodes to top-level nodes. This change modifies the documentation configuration file(s) accordingly. Change-Id: I42fe45b82e8342ddbd535c79754c1eea29521391 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Fix typo and add missing period to GridLayout documentation.Mitch Curtis2014-05-071-2/+2
| | | | | Change-Id: I200601a11935c3054c4b876fb9bf2e29ecf48c2d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Bump QtQuick.Controls import version to 1.2J-P Nurmi2014-04-071-1/+1
| | | | | Change-Id: Idc0b93cbfc2fe23e8be3bcaece672d06555a81f6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Import QtQuick 2.2J-P Nurmi2014-04-071-1/+1
| | | | | Change-Id: Ifc9719ec6fbbd80b866c01eebc471d0ed121bd16 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Do not reduce items size when snapping to pixel grid.Jan Arve Saether2014-03-192-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the required snapping to pixel grid, there was a high risk of reducing the size of an item to become smaller than its minimum size. With the original way of snapping (simply doing qRound) it didn't happen very often, but with the last change the problem became more evident: If an item that covered the full extent of a cell was snapped it would *always* shrink. Sometimes it could then shrink to become smaller than its minimum size. This was easy to see if the item snapped was a Text element with eliding enabled, since that meant that the text was elided as soon as the Text element got resized to smaller than its minimum. The current solution now is to always snap the x,y coordinates (with qCeil), but keep the width and height that was calculated by the layout. This means that snapped items will be shifted slightly to the right. Due to this they might extend almost a pixel outside their calculated cell (on the right or bottom sides). Due to this we also have to adjust the size hint result calculation so that it will also ceil up to the nearest integer. The only downside now is that row/column spacings might be less than specified, but they should not reduce by more than 1 pixel. Task-number: QTBUG-36235 Change-Id: Idca909f2102a1f7c5cb50d2490c7af39d722ff4f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-02-171-2/+3
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-2/+3
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/layouts/qquicklinearlayout.cpp Change-Id: Ib24dab43c37fc0f3f6a85398766f102a1ac833c3
| | * Allow size hint changes during a rearrange.Jan Arve Saether2014-01-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we marked the layout as not dirty straight after a rearrange was done. However, in the case of when a size hint changed during a rearrange that would block the pending rearrange (since it only perform the actual rearrange if its dirty). Instead, mark the layout as not dirty *before* the rearrange. This will allow bindings such as implicitWidth: height to execute the pending rearrange. (Although such bindings are not encouraged) Task-number: QTBUG-36169 Change-Id: I75bd821a0ca4302026bd5dac01287ca3359d471b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | Don't register LayoutBase as a type.Jan Arve Saether2014-02-174-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use qmlRegisterRevision() instead of qmlRegisterUncreatableType() This avoids that qmlplugindump generate an entry for LayoutBase and consequently doesn't show up in the code completion in Qt Creator. Change-Id: I8688b5d05382c3fbc3fc526cfbf34eda05b35d77 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | Update plugins.qmltypes for QtQuick.LayoutsJan Arve Saether2014-02-171-1/+5
|/ / | | | | | | | | Change-Id: I9b717b9986ce27102ab4a1bd8f6d6cc9aae006f1 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Make sure that items don't exceed the layout-computed boundaryJan Arve Saether2014-01-271-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When geometries were rounded to their nearest pixel grid geometry they sometimes exceeded the area the layout calculated them to cover. This could often be observed by that the visual spacing got shrunk to a smaller size than was specified. For small spacings values the visual spacing could even disappear. With this fix the visual spacing should never be smaller than the specified spacings value (but might be bigger due to rounding). Task-number: QTBUG-36235 Change-Id: I5142c793460e50fd2de397abfd2ea6730f1bd042 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>