mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-09-11 15:55:54 +03:00
List demo: make items smaller to avoid pointless performance meltdown
This commit is contained in:
parent
f609feac2a
commit
2ba4f822e6
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user