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
This commit is contained in:
@@ -642,6 +642,8 @@ Area::_UpdateMaxSizeConstraint(BSize max)
|
|||||||
max.width += fLeftInset + fRightInset;
|
max.width += fLeftInset + fRightInset;
|
||||||
max.height += fTopInset + fBottomInset;
|
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();
|
BAlignment alignment = fLayoutItem->Alignment();
|
||||||
if (alignment.Vertical() == B_ALIGN_USE_FULL_HEIGHT) {
|
if (alignment.Vertical() == B_ALIGN_USE_FULL_HEIGHT) {
|
||||||
if (fMaxContentHeight == NULL) {
|
if (fMaxContentHeight == NULL) {
|
||||||
@@ -657,7 +659,7 @@ Area::_UpdateMaxSizeConstraint(BSize max)
|
|||||||
fMaxContentHeight = NULL;
|
fMaxContentHeight = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alignment.Vertical() == B_ALIGN_USE_FULL_WIDTH) {
|
if (alignment.Horizontal() == B_ALIGN_USE_FULL_WIDTH) {
|
||||||
if (fMaxContentWidth == NULL) {
|
if (fMaxContentWidth == NULL) {
|
||||||
fMaxContentWidth = fLS->AddConstraint(-1.0, fLeft, 1.0, fRight,
|
fMaxContentWidth = fLS->AddConstraint(-1.0, fLeft, 1.0, fRight,
|
||||||
OperatorType(LE), max.Width());
|
OperatorType(LE), max.Width());
|
||||||
|
|||||||
Reference in New Issue
Block a user