mirror of
https://github.com/jtdaugherty/brick.git
synced 2025-01-05 21:03:07 +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