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

Regression in Layout size calculation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.2.0 Beta1
    • 5.2.0 Alpha
    • Quick: Layouts
    • None
    • All
    •  66fb8dd12189232a41164f0f6681699900ef2f3a

    Description

      There seems to be too much padding added to rowlayout. The regression was caused by change 36d1c9834c5e1951e6ec8ed70793e74441109a88.

      A test case to reproduce it against current stable branch: http://pastebin.com/vyFhcjb3

      import QtQuick 2.1
      import QtQuick.Controls 1.0
      import QtQuick.Layouts 1.0
      
      ApplicationWindow {
      
          statusBar: StatusBar {
              RowLayout {
                  Label { }
                  ProgressBar { }
              }
          }
      }
      

      temp workaround: http://pastebin.com/Jb58iGpE

      diff --git a/src/layouts/qgridlayoutengine.cpp b/src/layouts/qgridlayoutengine.cpp
      index e6b21e5..a6f9360 100644
      --- a/src/layouts/qgridlayoutengine.cpp
      +++ b/src/layouts/qgridlayoutengine.cpp
      @@ -610,7 +610,7 @@ QGridLayoutBox QGridLayoutItem::box(Qt::Orientation orientation, qreal constrain
               }
       
               result.q_minimumDescent = sizeHint(Qt::MinimumDescent, constraintSize).height();
      -        if (result.q_minimumDescent != -1.0) {
      +        if (false && result.q_minimumDescent != -1.0) {
                   const qreal minSizeHint = sizeHint(Qt::MinimumSize, constraintSize).height();
                   result.q_minimumDescent -= (minSizeHint - result.q_minimumSize);
                   result.q_minimumAscent = result.q_minimumSize - result.q_minimumDescent;
      

      Attachments

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

        Activity

          People

            smd Jan Arve
            bachewii Jens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes