diff options
-rw-r--r-- | html/haddock.css | 2 | ||||
-rw-r--r-- | src/HaddockHtml.hs | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/html/haddock.css b/html/haddock.css index 8c6bb69b..aa6e13aa 100644 --- a/html/haddock.css +++ b/html/haddock.css @@ -36,7 +36,7 @@ TD.s15 { height: 15px; } SPAN.keyword { text-decoration: underline; } /* Resize the buttom image to match the text size */ -IMG.coll { width : 0.75em; height: 0.75em; margin-bottom: 0; margin-right: 0.125em } +IMG.coll { width : 0.75em; height: 0.75em; margin-bottom: 0; margin-right: 0.5em } /* --------- Documentation elements ---------- */ diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs index ffd9da47..96d8d816 100644 --- a/src/HaddockHtml.hs +++ b/src/HaddockHtml.hs @@ -252,7 +252,7 @@ ppPrologue title (Just doc) = ppModuleTree :: String -> [ModuleTree] -> HtmlTable ppModuleTree _ ts = tda [theclass "section1"] << toHtml "Modules" </> - pad_td 0 << vanillaTable << htmlTable + pad_td Nothing << vanillaTable << htmlTable where genTable htmlTable id [] = (htmlTable,id) genTable htmlTable id (x:xs) = genTable (htmlTable </> u) id' xs @@ -265,9 +265,9 @@ mkNode :: [String] -> ModuleTree -> Int -> (HtmlTable,Int) mkNode ss (Node s leaf pkg ts) id = htmlNode where htmlNode = case ts of - [] -> ( pad_td 15 << htmlModule <-> htmlPkg,id) - _ -> ((pad_td 0 << (collapsebutton id_s +++ toHtml " " +++ htmlModule) <-> htmlPkg) </> - (pad_td 20 << sub_tree), id') + [] -> ( pad_td (Just 1.25) << htmlModule <-> htmlPkg,id) + _ -> ((pad_td Nothing<< (collapsebutton id_s +++ htmlModule) <-> htmlPkg) </> + (pad_td (Just 2) << sub_tree), id') htmlModule | leaf = ppHsModule mdl @@ -293,8 +293,9 @@ mkNode ss (Node s leaf pkg ts) id = htmlNode where (u,id') = mkNode (s:ss) x id -pad_td 0 = tda [width "100%"] -pad_td n = tda [thestyle ("padding-left:" ++ show n ++ "px"), width "100%"] +pad_td :: Maybe Float -> Html -> HtmlTable +pad_td Nothing = tda [width "100%"] +pad_td (Just n) = tda [thestyle ("padding-left:" ++ show n ++ "em"), width "100%"] -- --------------------------------------------------------------------------- -- Generate the index |