Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12273

Rewinding AnchorChanges makes the item's implicit width and height explicit

    XMLWordPrintable

Details

    • 164b2b54922d87a44a60efe6dbbe2fa3b7716820

    Description

      Problem: function void QDeclarativeAnchorChanges::rewind() in /src/declarative/util/qdeclarativestateoperations.cpp always calls setWidth() and setHeight() even when the AnchorChanges hasn't caused the width and/or height to become explicit.

      See attached qml program as an example. When AnchorChanges is rewinded from a state, implicit Column height becomes explicit, breaking the implicit resizing behavior of the positioner. Seems fairly innocent, but the implicit resizing is important for many declarative elements, for example Rows, Column, Images, BorderImages and Text elements.

      In the example a column contains 1 to 2 blue rectangle anchored to the bottom of the red rectangle with 10px margin. After the first state changes the column height stops following the number of rectangles it contains.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jpetrell Joona Petrell
            jpetrell Joona Petrell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes