List demo: make items smaller to avoid pointless performance meltdown

This commit is contained in:
Jonathan Daugherty 2015-07-03 14:23:35 -07:00
parent f609feac2a
commit 2ba4f822e6

View File

@ -54,8 +54,7 @@ listDrawElement sel i =
let selStr s = if sel
then withAttr customAttr (str $ "<" <> s <> ">")
else str s
in (hCenterWith (Just ' ') $ vBox $ for [1..i+1] $ \j ->
"Item " <+> (selStr $ show i) <+> " Line " <+> (str $ show j)) <=> hBorder
in hCenter $ "Item " <+> (selStr $ show i)
initialState :: List Int
initialState = list (Name "list") listDrawElement [0, 1, 2]