mirror of
https://github.com/jtdaugherty/brick.git
synced 2025-01-07 14:36:59 +03:00
List: adding list item widgets that grow vertically is not permitted
This commit is contained in:
parent
5a59675943
commit
bf1e50d0e6
@ -67,7 +67,10 @@ drawListElements l = drawnElements
|
||||
es = listElements l
|
||||
drawnElements = for (zip [0..] es) $ \(i, e) ->
|
||||
let isSelected = Just i == listSelected l
|
||||
elemWidget = listElementDraw l isSelected e
|
||||
elemWidget = let w = listElementDraw l isSelected e
|
||||
in if vSize w == Unlimited
|
||||
then error "Tried to add a list widget that has has an unlimited vertical size"
|
||||
else w
|
||||
makeVisible = if isSelected
|
||||
then (visible . withAttrName listSelectedAttr)
|
||||
else id
|
||||
|
Loading…
Reference in New Issue
Block a user