QGraphicsAnchorLayout: fix merging of preferredSizeHint
authorCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Thu, 13 Aug 2009 18:07:34 +0000 (15:07 -0300)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Thu, 13 Aug 2009 18:07:34 +0000 (15:07 -0300)
commit548583f449432363fad8fe547ce073bb754d46be
tree815ff67f743f7901488c0c4dbd30eead7bfa09d3
parent114e4b6ca9a1871f75dc5b9d443ab1e344eb99af
QGraphicsAnchorLayout: fix merging of preferredSizeHint

In simplification, the preferred size of a parallel group should get the
maximum preferred size (and bound it to the maximum size). This follows
the principle that for an layout item: 'growing is better than
shrinking', and is consistent with what our linear program also do.

This patch also make sure that the sizeAt* are properly initialized to
the preferred size, the idea is if there's no restriction upon an
anchor, it'll keep it's preferred size no matter what.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
src/gui/graphicsview/qgraphicsanchorlayout_p.cpp