~alcinnz/CatTrap

ebc78569d9a4d332ebb86748c1e8e86b50a33ad3 — Adrian Cochrane 1 year, 2 months ago aa8da03
Upgrade underlying Balkon.
3 files changed, 5 insertions(+), 8 deletions(-)

M Graphics/Layout/CSS.hs
M Graphics/Layout/Inline.hs
M cattrap.cabal
M Graphics/Layout/CSS.hs => Graphics/Layout/CSS.hs +2 -5
@@ 9,7 9,7 @@ module Graphics.Layout.CSS(CSSBox(..), BoxSizing(..), Display(..),
import qualified Data.Text as Txt
import Stylist (PropertyParser(..))
import Stylist.Tree (StyleTree(..))
import Data.Text.ParagraphLayout.Rich (paragraphLineHeight, constructParagraph,
import Data.Text.ParagraphLayout.Rich (constructParagraph,
        defaultParagraphOptions, defaultBoxOptions,
        LineHeight(..), InnerNode(..), Box(..), RootNode(..))



@@ 109,10 109,7 @@ finalizeChilds root parent style' childs@(child:childs')
    finalizeParagraph (RootBox (Box [TextSequence _ txt] _))
        | Txt.all isSpace txt = Nothing -- Discard isolated whitespace.
    finalizeParagraph tree =
        Just $ constructParagraph "" tree "" defaultParagraphOptions {
            paragraphLineHeight = Absolute $ toEnum $ fromEnum
                    (lineheight parent * hbUnit)
          }
        Just $ constructParagraph "" tree "" defaultParagraphOptions
    enumerate = zip $ enumFrom 0
finalizeChilds _ _ _ [] = []


M Graphics/Layout/Inline.hs => Graphics/Layout/Inline.hs +2 -2
@@ 179,8 179,8 @@ positionTree (x, y) self@(Branch (AncestorBox (a, b, c) d e f g) childs) =
  where
    pos = (x + hbScale (x_min rect), y + hbScale (y_min rect))
    rect = treeRect self
positionTree (x, y) self@(Leaf (Fragment (a, b, c) d _ f g h)) =
    Leaf (Fragment (a, b, (pos, c)) d [] f g h)
positionTree (x, y) self@(Leaf (Fragment (a, b, c) d _ f g h i)) =
    Leaf (Fragment (a, b, (pos, c)) d [] f g h i)
  where
    pos = (x + hbScale (x_min rect), y + hbScale (y_min rect))
    rect = treeRect self

M cattrap.cabal => cattrap.cabal +1 -1
@@ 34,7 34,7 @@ library
                        stylist-traits >= 0.1.3.0 && < 1,
                        fontconfig-pure >= 0.2 && < 0.3,
                        harfbuzz-pure >= 1.0.3.2 && < 1.1, bytestring,
                        balkon >= 1.1 && <2, unordered-containers
                        balkon >= 1.2 && <2, unordered-containers
  -- hs-source-dirs:
  default-language:    Haskell2010
  ghc-options:         -Wincomplete-patterns