From 33c82c1e9d470386ea220281e4f1b8fc1a0f0f84 Mon Sep 17 00:00:00 2001 From: Clemens Zeidler Date: Wed, 22 Sep 2010 05:24:15 +0000 Subject: [PATCH] Compare the correct orientation and add a comment about it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38778 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/libs/alm/Area.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/alm/Area.cpp b/src/libs/alm/Area.cpp index 698d393487..d1cde7df1e 100644 --- a/src/libs/alm/Area.cpp +++ b/src/libs/alm/Area.cpp @@ -642,6 +642,8 @@ Area::_UpdateMaxSizeConstraint(BSize max) max.width += fLeftInset + fRightInset; max.height += fTopInset + fBottomInset; + // we only need max constraints if the alignment is full height/width + // otherwise we can just align the item in the free space BAlignment alignment = fLayoutItem->Alignment(); if (alignment.Vertical() == B_ALIGN_USE_FULL_HEIGHT) { if (fMaxContentHeight == NULL) { @@ -657,7 +659,7 @@ Area::_UpdateMaxSizeConstraint(BSize max) fMaxContentHeight = NULL; } - if (alignment.Vertical() == B_ALIGN_USE_FULL_WIDTH) { + if (alignment.Horizontal() == B_ALIGN_USE_FULL_WIDTH) { if (fMaxContentWidth == NULL) { fMaxContentWidth = fLS->AddConstraint(-1.0, fLeft, 1.0, fRight, OperatorType(LE), max.Width());