aboutsummaryrefslogtreecommitdiff
path: root/dw/oofposrelmgr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dw/oofposrelmgr.cc')
-rw-r--r--dw/oofposrelmgr.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/dw/oofposrelmgr.cc b/dw/oofposrelmgr.cc
index 90cc47ae..8820f8b5 100644
--- a/dw/oofposrelmgr.cc
+++ b/dw/oofposrelmgr.cc
@@ -79,11 +79,11 @@ void OOFPosRelMgr::sizeAllocateEnd (OOFAwareWidget *caller)
Requisition childReq;
child->widget->sizeRequest (&childReq);
- Allocation childAlloc;
- childAlloc.x = containerAllocation.x +
- container->getStyle()->boxOffsetX () + child->x;
- childAlloc.y = containerAllocation.y +
- container->getStyle()->boxOffsetY () + child->y;
+ Allocation *genAlloc = child->generator == container ?
+ &containerAllocation : child->generator->getAllocation (),
+ childAlloc;
+ childAlloc.x = genAlloc->x + child->x;
+ childAlloc.y = genAlloc->y + child->y;
childAlloc.width = childReq.width;
childAlloc.ascent = childReq.ascent;
childAlloc.descent = childReq.descent;