You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sizeOfRegion o imgs =fmapConstraint_Fixed<$> mapDynM
( \r ->do
a <- sample imgs
let direction = (if r ==Orientation_ColumnthenV.imageHeight elseV.imageWidth)
pure$foldr
( \y x ->
direction y + x
)
0
a
)
o
fit child =do
ori <- askOrientation
(_, images) <- listenImages child
c <- sizeOfRegion ori images
grout c child
listenImages being an listen implementation for the ImageWriter
Unfortunately this hangs. I believe it's due to the fact that I'm samping the Behavior t [Image]. Is there any way I could get around?
Making sure I understand: is the idea here to do something like fixed but having the size part of the constraint computed by the actual size of the child?
Why
Current options make it so that rendering fixed size TUI images requires us to know the size they'll take up.
It seems to me that it's possible to compute this size by using
imageHeight
andimageWidth
fromvty
.I believe this is how
brick
does it.Proposed solution:
Add
Constraint_Fit
and correspondingfit
function.The text was updated successfully, but these errors were encountered: