- 31 May, 2013 - 1 commit
-
-
Jan Arve Saether authored
* List all applicable attached properties for each layout * Move the stuff that describes min,pref and max sizes from GridLayout to the Layout docs. * Document that all layouts \inherits Item. (Even if they don't directly inherit, this is consistent with how the positioners are documented) * Add some links to Row, Column and Grid where appropriate * Use \qmlattachedproperty instead of \qmlproperty for the attached properties. (Again, consistent with how the Positioners attached properties are documented) * Change POSITIVE_INFINITE to the correct POSITIVE_INFINITY Change-Id: Ia9272faa479b48a97300b031402c0380ca113d7b Reviewed-by:
Caroline Chao <caroline.chao@digia.com> Reviewed-by:
Jerome Pasion <jerome.pasion@digia.com>
-
- 30 May, 2013 - 1 commit
-
-
Jan Arve Saether authored
onItemVisibleChanged() was in some cases called after the dtor of QQuickGridLayoutBase was called. After having called the dtor of QQuickGridLayoutBase it would continue to call the dtors of its base classes until it entered the dtor of QQuickItem. In QQuickItem it would call setParentItem(0) on all its child items. This caused the item to become visible again, thus it would emit visibleChanged() and finally invoke QQuickGridLayoutBase::onItemVisibleChanged() which lead to the crash (while trying to call the virtual invalidate()) The fix is to do an early return if we know that the layout is in the destruction phase. isReady() will return only true *after* the component is completed, and before the component is destructing. Task-number: QTBUG-31276 Change-Id: I191e348278e3d052c109bffb92a1ccd9326859bd Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com>
-
- 29 May, 2013 - 1 commit
-
-
Jan Arve Saether authored
Change-Id: I6f34ace6a24ce918cdd417bbfcd2fe8126aa321b Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by:
Jan Arve Sæther <jan-arve.saether@digia.com>
-
- 23 May, 2013 - 1 commit
-
-
Jan Arve Saether authored
Casting a QLayoutPolicy::Fixed to bool was fine since that would return false. However, casting a QLayoutPolicy::Shrink to bool would return true, which would give wrong results. (The conditions only want to check if the item can grow). There were no bugs because of this, simply because the Qt Quick Layouts API does not allow setting *only* the shrink flag. However, it would become a bug if we ever added such a feature. Change-Id: I781aec85117f45e12e49ba27f7ed8f5724f71bd9 Reviewed-by:
Richard Moe Gustavsen <richard.gustavsen@digia.com>
-
- 22 May, 2013 - 1 commit
-
-
Jan Arve Saether authored
The initialization of ignoreItem was simply wrong. Task-number: QTBUG-31128 Change-Id: I67b41bc30099222d64aa6efb3c28e87a0ce043ca Reviewed-by:
Richard Moe Gustavsen <richard.gustavsen@digia.com>
-
- 16 May, 2013 - 1 commit
-
-
Jan Arve Saether authored
This reverts commit 91fc9b18 . This patch got reverted because it broke the basiclayouts example on Mac OS. However, the bug was in the basiclayouts example, so we can still add this patch. Change-Id: I97c3cf30dd5a5c97916b4811d8be0b5b5a7ebb4e Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com>
-
- 10 May, 2013 - 2 commits
-
-
Jens Bache-Wiig authored
This reverts commit a4158c97d84d5c76126307213baf22d12babdbc2 This commit breaks the basiclayouts example so I am reverting it until we have a revised ifx. Change-Id: I901924d292606ffe1e797232ad2f5ff02d8fc2d6 Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com>
-
Jan Arve Saether authored
This was a bit inconsistent, because in the case of a Rectangle its Layout.maximumWidth would return -1 by default (which was supposed to be interpreted as infinity) However, since the maximumWidth propagated up to the layout, the layout.Layout.maximumWidth would return 1000000000. Adding two Rectangles to the layout would make layout.Layout.maximumWidth return 2000000000, and adding a third item with Layout.maximumWidth:1 would make layout.Layout.maximumWidth return 2000000001 With this change, since infinity + number = infinity, everything that can grow to infinity will just return infinity. In addition a developer can now more intuitively do comparisons like this: if (value > Layout.minimumWidth && value < Layout.maximumWidth) instead of if ((value == -1 || value > Layout.minimumWidth) && (value != -1 && value < Layout.maximumWidth)) Now, as a bonus, it becomes less consistent to set an attached (min,max) property to -1 in order to reset it to its implicit value. This also fixes a documentation issue with regards to the attached Layout.{min|max}imum{Width|Height} properties. It only told the story correct if the item was not a layout, and updates the docs for the max sizes to mention that it returns Number.POSITIVE_INFINITY Change-Id: Ia638064fd3ed5614d7e496a9b5e4aa8fcb7307f7 Reviewed-by:
Richard Moe Gustavsen <richard.gustavsen@digia.com>
-
- 30 Apr, 2013 - 1 commit
-
-
Jan Arve Saether authored
The previous code was a bit rough in how it determined if the item was supposed to be ignored or not. For instance, it did not ignore items with Layout.maximumWidth: 0 or Layout.preferredWidth: 0 Layout.fillWidth: false The following patch will use QQuickLayoutItem::effectiveSizeHints_helper. Since that is now shared, it should make the behavior more consistent. The patch also fixes a bug where ignored items (e.g. a hidden item) was not re-added to the layout if it became visible again. (QTBUG-30796) We use a QSet to keep track of the ignored items, and repopulate the layout if any of the items in the QSet changed some properties relevant for the layout. Task-number: QTBUG-30796 Change-Id: Ia4b0584ed61e1b24efaca322551f6bb1a4228ca6 Reviewed-by:
Richard Moe Gustavsen <richard.gustavsen@digia.com>
-
- 26 Apr, 2013 - 2 commits
-
-
Jan Arve Saether authored
This issue refactors how size hints are propagated up layout hierarchies. It fixes several problems: 1. Do not overwrite explicitly set size hints when propagating them (Covered by test_sizeHint(propagateNone) ) 2. Propagate size hints immediately when they are changed. Previously, this was in an inconsistent state, since for some operations (such as implicitWidth changes) it would immediately propagate through an explicit call to propagateSizeHints. However, changes to other properties such as Layout.minimumWidth would simply call invalidate(), causing the propagation to be postponed until the layout got rearranged. 3. Do not propagate size hints from rearrange. This could potentially make rearrange() unnecessary slow. 4. Only use the fallback to width/height the *first* time the size hint is queried. This had the unfortunate consequence when a Layout.preferredWidth was reset back to -1 it could end up querying the width again (due to layout resizing, this could at this point be different than what was specified in the QML file). This is still not bullet proof, but AFAIK there is no bullet-proof way, since there is no way of retrieving the original value that 'width' was bound to in the QML file. (Covered by test_sizeHintPropagationCount) The performance characteristics for this change should be that it will make resizing of layouts faster, but will make dynamic changes to the layout slower (since it has to propagate the size hints every time a property is changed). Change-Id: I3dd818f6f7504908534eb5b22413fbeba1877985 Task-number: QTBUG-30773 Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com>
-
Jan Arve Saether authored
This is needed because changing the flow will change which cell an item is associated with. Change-Id: Id84d1710fb6d7debe72a859c52b505e1e47f06b0 Reviewed-by:
Richard Moe Gustavsen <richard.gustavsen@digia.com>
-
- 19 Apr, 2013 - 1 commit
-
-
Jan Arve Saether authored
* Fix alignment support for Row/ColumnLayout. * Ignore "Repeater-like" items just like QQuickGridLayout test_alignment() tested actually the gridlayout, therefore move it to tst_gridlayout.qml. Add a RowLayout-specific autotest. Change-Id: I5e32775cf7f533f91ce68f8ec9fd95978cda7005 Reviewed-by:
Caroline Chao <caroline.chao@digia.com>
-
- 17 Apr, 2013 - 1 commit
-
-
Jan Arve Saether authored
This allows us to move some docs out of GridLayout and into the Layout documentation. Did some additional polishing of documentation. Change-Id: I49425d7f6b30b48527fb98ac010b094bf02c00a8 Reviewed-by:
Martin Smith <martin.smith@digia.com>
-
- 15 Apr, 2013 - 1 commit
-
-
Jan Arve Saether authored
Alignment is per-item Change-Id: Ifac9d46e9eccddd62e179d321d65c4f19c327f67 Reviewed-by:
Richard Moe Gustavsen <richard.gustavsen@digia.com>
-
- 12 Apr, 2013 - 1 commit
-
-
Jan Arve Saether authored
Change-Id: Iccb50c20e7a5806bf4a72956eeb7097c1bf0ccc2 Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com>
-
- 11 Apr, 2013 - 1 commit
-
-
Jan Arve Saether authored
This patch is adressing the comments in the merged commit https://codereview.qt-project.org/#change,53287,patchset=3 Change-Id: Ie98db08da2d70c62f47d32d12c27d76c5bda2807 Reviewed-by:
Nico Vertriest <nico.vertriest@digia.com> Reviewed-by:
Jerome Pasion <jerome.pasion@digia.com>
-
- 10 Apr, 2013 - 2 commits
-
-
Jan Arve Saether authored
Change-Id: Ia220ccfd534ca089367c4ee954e081770784524c Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by:
Jerome Pasion <jerome.pasion@digia.com>
-
Jan Arve Saether authored
setupItemLayout was supposed to do initialization on each item before it got added to the layout, but all it did was to add the attached property to the item, which is really not needed anymore. The layout code does not work under the assumption that each item has the attached property anyway, so we can remove it. (And in addition avoid some potential allocations) Change-Id: I6d7e3e5b13531dfeaceef495de144dcf87d38cc4 Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com>
-
- 09 Apr, 2013 - 1 commit
-
-
Jan Arve Saether authored
Change-Id: I8d24afeef04003c3789eaa7bd136e3f2de0dcc6b Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com>
-
- 04 Apr, 2013 - 1 commit
-
-
Jan Arve Saether authored
Items will be laid sequentially in the grid, either in LeftToRight mode or TopToBottom mode (depending on the value of the flow property) Change-Id: Ib080517260ac4519171e77abd533cad3f306f70e Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com>
-
- 03 Apr, 2013 - 1 commit
-
-
Jan Arve Saether authored
* API: set{Horizontal,Vertical}Spacing -> set{Column,Row}Spacing * Fixed a bug where setRowSpacing actually modified the column spacing. * The ctor now set the spacings of both row and column in one go. Change-Id: Ic5c5921f6f4e38edaeafdf911a2f14fbc7d496f8 Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com>
-
- 22 Mar, 2013 - 1 commit
-
-
Jan Arve Saether authored
This makes it more consistent with Grid element, and with the other properties the GridLayout has (rows,columns,Layout.row...) Change-Id: I341a806df889a7888ac0466e07d73bb2ea90f5ef Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com>
-
- 20 Mar, 2013 - 1 commit
-
-
Jan Arve Saether authored
Change-Id: I4f048158d437a4a02fb6c78165ccb21d4f144916 Reviewed-by:
Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by:
Jens Bache-Wiig <jens.bache-wiig@digia.com>
-
- 14 Mar, 2013 - 1 commit
-
-
Jan Arve Saether authored
Since we also rearrange in geometryChanged(), this should ensure that we recurse down and arrange all sublayouts. This assumes that objects are constructed in bottom-up order. (That's what componentComplete() indicates.) Previously we would risk rearranging sublayouts several times: 1. Sublayout got componentComplete -> geometryChanged -> rearrange() 2. Parent layout got componentComplete -> geometryChanged -> rearrange() 3. Since the sublayout was a layout item of the parent layout it could get a geometry change again, causing it to rearrange again. This also fixes the issue where the implicitWidth/Height of the layout was not immediately set after componentComplete, which could cause it to get the wrong initial size. Change-Id: I63a35dd934cd3ace01fab6319333d531631a6f4e Reviewed-by:
Frederik Gladhorn <frederik.gladhorn@digia.com>
-
- 13 Mar, 2013 - 2 commits
-
-
Jan Arve Saether authored
Change-Id: I02a347e285738d982ef3bfea7580613647690594 Reviewed-by:
Richard Moe Gustavsen <richard.gustavsen@digia.com>
-
Jan Arve Saether authored
QQuickLinearLayout::insertLayoutItem is only called from updateLayoutItems(), and updateLayoutItems() calls invalidate() after it has finished calling insertLayoutItem() with all its children. Change-Id: I67a195522fd7807d77147bc5cfe33e01af105f3f Reviewed-by:
Richard Moe Gustavsen <richard.gustavsen@digia.com>
-
- 11 Mar, 2013 - 1 commit
-
-
J-P Nurmi authored
Change-Id: Ia6dab83628142363cdbcb6d98562ac7d9f9cfe9f Reviewed-by:
Jan Arve Sæther <jan-arve.saether@digia.com>
-
- 07 Mar, 2013 - 1 commit
-
-
Caroline Chao authored
Change-Id: I83215dde15aa335925bdb116c24272531345dbe2 Reviewed-by:
Jan Arve Sæther <jan-arve.saether@digia.com>
-
- 06 Mar, 2013 - 1 commit
-
-
Jan Arve Saether authored
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>
-