From a2a429363faa68f3cb28a19979cba720e2614c80 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Fri, 7 Apr 2023 12:20:09 +1200 Subject: [PATCH] Merge in-porgress changes. --- Graphics/Layout.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Graphics/Layout.hs b/Graphics/Layout.hs index ca076f8..1c2c17a 100644 --- a/Graphics/Layout.hs +++ b/Graphics/Layout.hs @@ -5,7 +5,7 @@ module Graphics.Layout(LayoutItem(..), boxNatHeight, boxMinHeight, boxMaxHeight, boxHeight, boxSplit, boxPaginate, boxPosition, boxLayout, glyphsPerFont) where -import Data.Text.ParagraphLayout (Paragraph(..), ParagraphOptions(..), Fragment(..)) +import Data.Text.ParagraphLayout (Paragraph(..), ParagraphOptions(..), PageOptions(..), Fragment(..)) import Graphics.Layout.Box as B import Graphics.Layout.Grid as G @@ -24,7 +24,7 @@ import Graphics.Text.Font.Choose (Pattern) data LayoutItem m n x = LayoutFlow x (PaddedBox m n) [LayoutItem m n x] | LayoutGrid x (Grid m n) [(GridItem m n, LayoutItem m n x)] - | LayoutInline x Font' Paragraph [x] -- Balkon holds children. + | LayoutInline x Font' Paragraph PageOptions [x] -- Balkon holds children. | LayoutSpan x Font' Fragment -- More to come... @@ -45,11 +45,11 @@ layoutGetBox (LayoutSpan _ f self) = zero { layoutGetChilds (LayoutFlow _ _ ret) = ret layoutGetChilds (LayoutGrid _ _ ret) = map snd ret layoutGetChilds (LayoutSpan _ _ _) = [] -layoutGetChilds (LayoutInline _ font self vals) = map inner $ inlineChildren vals self +layoutGetChilds (LayoutInline _ font self _ vals) = map inner $ inlineChildren vals self where inner (val, fragment) = LayoutSpan val font fragment layoutGetInner (LayoutFlow ret _ _) = ret layoutGetInner (LayoutGrid ret _ _) = ret -layoutGetInner (LayoutInline ret _ _ _) = ret +layoutGetInner (LayoutInline ret _ _ _ _) = ret layoutGetInner (LayoutSpan ret _ _) = ret setCellBox' (child, cell) = cell { gridItemBox = layoutGetBox child } -- 2.30.2