@@ 116,18 116,19 @@ boxNatWidth parent (LayoutGrid val self childs) = LayoutGrid val self' $ zip cel
zeroBox = zero
boxNatWidth _ self@(LayoutInline _ _ _ _) = self
boxNatWidth _ self@(LayoutSpan _ _ _) = self
-boxMaxWidth :: PaddedBox a Double -> LayoutItem y Length x -> (Double, LayoutItem y Length x)
-boxMaxWidth parent (LayoutFlow val self childs) = (max', LayoutFlow val self' childs)
+boxMaxWidth :: PaddedBox a Double -> LayoutItem y Length x -> LayoutItem y Length x
+boxMaxWidth parent (LayoutFlow val self childs) = LayoutFlow val self' childs'
where
+ childs' = map (boxMaxWidth self'') childs
+ self'' = mapX (lowerLength $ inline $ B.size parent) self'
self' = self { B.max = Size (Pixels max') (block $ B.max self) }
max' = flowMaxWidth parent self
-boxMaxWidth parent (LayoutGrid val self childs) =
- (max', LayoutGrid val self' childs)
+boxMaxWidth parent (LayoutGrid val self childs) = LayoutGrid val self' childs
where
self' = self { containerMax = Size (Pixels max') (block $ containerMax self) }
(max', _) = gridMaxWidths parent self $ colBounds self
-boxMaxWidth parent self@(LayoutInline _ _ _ _) = (B.inline $ B.max parent, self)
-boxMaxWidth parent self@(LayoutSpan _ f self') = (B.inline $ fragmentSize' f self', self)
+boxMaxWidth parent self@(LayoutInline _ _ _ _) = self
+boxMaxWidth parent self@(LayoutSpan _ f self') = self
boxWidth :: (Zero y, CastDouble y) => PaddedBox b Double -> LayoutItem y Length x ->
(Double, LayoutItem y Double x)
boxWidth parent (LayoutFlow val self childs) = (size', LayoutFlow val self' childs')
@@ 338,7 339,7 @@ boxLayout parent self paginate = self8
where
self0 = boxMinWidth Nothing self
self1 = boxNatWidth Nothing self0
- (_, self2) = boxMaxWidth parent self1
+ self2 = boxMaxWidth parent self1
(_, self3) = boxWidth parent self2
(natsize, self4) = boxNatHeight (inline $ size parent) self3
(_, self5) = boxMinHeight natsize self4