src/gui/kernel/qboxlayout.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 0 1918ee327afb
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
   828         int space = horz(d->dir) ? s.width() : s.height();
   828         int space = horz(d->dir) ? s.width() : s.height();
   829         int n = a.count();
   829         int n = a.count();
   830         if (d->hasHfw && !horz(d->dir)) {
   830         if (d->hasHfw && !horz(d->dir)) {
   831             for (int i = 0; i < n; i++) {
   831             for (int i = 0; i < n; i++) {
   832                 QBoxLayoutItem *box = d->list.at(i);
   832                 QBoxLayoutItem *box = d->list.at(i);
   833                 if (box->item->hasHeightForWidth())
   833                 if (box->item->hasHeightForWidth()) {
       
   834                     int width = qBound(box->item->minimumSize().width(), s.width(), box->item->maximumSize().width());
   834                     a[i].sizeHint = a[i].minimumSize =
   835                     a[i].sizeHint = a[i].minimumSize =
   835                                     box->item->heightForWidth(s.width());
   836                                     box->item->heightForWidth(width);
       
   837                 }
   836             }
   838             }
   837         }
   839         }
   838 
   840 
   839         Direction visualDir = d->dir;
   841         Direction visualDir = d->dir;
   840         QWidget *parent = parentWidget();
   842         QWidget *parent = parentWidget();