1. May 31, 2013
    • Jan Arve Saether's avatar
      Several improvements to documentation · c5d39cb1
      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: default avatarCaroline Chao <caroline.chao@digia.com>
      Reviewed-by: default avatarJerome Pasion <jerome.pasion@digia.com>
      c5d39cb1
  2. May 22, 2013
  3. May 16, 2013
  4. May 10, 2013
    • Jens Bache-Wiig's avatar
      Revert "Return infinity instead of -1 as a default value for max sizes" · 91fc9b18
      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: default avatarJens Bache-Wiig <jens.bache-wiig@digia.com>
      91fc9b18
    • Jan Arve Saether's avatar
      Return infinity instead of -1 as a default value for max sizes · 16558ac7
      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: default avatarRichard Moe Gustavsen <richard.gustavsen@digia.com>
      16558ac7
  5. May 03, 2013
  6. Apr 26, 2013
    • Jan Arve Saether's avatar
      Refactor propagation of size hints · 5dec3ed5
      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: default avatarJens Bache-Wiig <jens.bache-wiig@digia.com>
      5dec3ed5
  7. Apr 17, 2013
  8. Apr 15, 2013
  9. Apr 10, 2013
    • Jan Arve Saether's avatar
      Remove a function that doesn't serve any purpose anymore. · 628d3eeb
      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: default avatarJens Bache-Wiig <jens.bache-wiig@digia.com>
      628d3eeb
  10. Apr 04, 2013
  11. Mar 22, 2013
  12. Mar 14, 2013
    • Jan Arve Saether's avatar
      Rearrange only the topmost layout. · 0c935730
      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: default avatarFrederik Gladhorn <frederik.gladhorn@digia.com>
      0c935730
  13. Mar 12, 2013
  14. Mar 06, 2013
  15. Feb 21, 2013
  16. Feb 19, 2013
  17. Jan 04, 2013
  18. Dec 20, 2012
  19. Dec 05, 2012
  20. Nov 20, 2012
  21. Jun 29, 2012