diff --git a/headers/libs/alm/Area.h b/headers/libs/alm/Area.h index 66be69b810..ef40616ded 100644 --- a/headers/libs/alm/Area.h +++ b/headers/libs/alm/Area.h @@ -106,7 +106,7 @@ private: Row* row, Column* column, RowColumnManager* manager); - void _DoLayout(); + void _DoLayout(const BPoint& offset); void _UpdateMinSizeConstraint(BSize min); void _UpdateMaxSizeConstraint(BSize max); diff --git a/src/libs/alm/ALMLayout.cpp b/src/libs/alm/ALMLayout.cpp index 9df6df41b0..c2bc32c0f0 100644 --- a/src/libs/alm/ALMLayout.cpp +++ b/src/libs/alm/ALMLayout.cpp @@ -794,14 +794,15 @@ BALMLayout::DoLayout() // Enforced absolute positions of Right and Bottom BRect area(LayoutArea()); - Right()->SetRange(area.right, area.right); - Bottom()->SetRange(area.bottom, area.bottom); + BSize size(area.Size()); + Right()->SetRange(size.width, size.width); + Bottom()->SetRange(size.height, size.height); _TrySolve(); // set the calculated positions and sizes for every area for (int32 i = 0; i < CountItems(); i++) - AreaFor(ItemAt(i))->_DoLayout(); + AreaFor(ItemAt(i))->_DoLayout(area.LeftTop()); } diff --git a/src/libs/alm/Area.cpp b/src/libs/alm/Area.cpp index 0f25e3a82a..abc1dc9280 100644 --- a/src/libs/alm/Area.cpp +++ b/src/libs/alm/Area.cpp @@ -565,7 +565,7 @@ Area::_Init(LinearSpec* ls, Row* row, Column* column, RowColumnManager* manager) * Perform layout on the area. */ void -Area::_DoLayout() +Area::_DoLayout(const BPoint& offset) { // check if if we are initialized if (!fLeft) @@ -577,7 +577,7 @@ Area::_DoLayout() areaFrame.top += TopInset(); areaFrame.bottom -= BottomInset(); - fLayoutItem->AlignInFrame(areaFrame); + fLayoutItem->AlignInFrame(areaFrame.OffsetBySelf(offset)); }