diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-02-11 17:42:51 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-02-11 17:42:51 -0500 |
| commit | c8610ea4164403c418c3fc13aee13685aeff447f (patch) | |
| tree | 06e0d4b2012b791fd6bec059d6cde0fd22a3d5e1 /layout/rows.go | |
| parent | ebc5d96f0614ab3b4f2073eadf22fbe554b0ec8f (diff) | |
| download | gui-c8610ea4164403c418c3fc13aee13685aeff447f.zip | |
add border layout
Diffstat (limited to 'layout/rows.go')
| -rw-r--r-- | layout/rows.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layout/rows.go b/layout/rows.go index 603eddc..cfb85c9 100644 --- a/layout/rows.go +++ b/layout/rows.go @@ -39,7 +39,7 @@ func NewRows(env gui.Env, nrows uint) []gui.Env { event := (<-env.Events()).(gui.Resize) // first event guaranteed to be Resize area := event.Rectangle rowHeights := make([]uint, nrows) // initially zero until draw call received - resize(area, rowHeights) // send first Resize to children + go resize(area, rowHeights) // send first Resize to children // Multiplex rows' draw channels. Tag draw functions with row index. draws := make(chan taggedDrawCall) @@ -56,9 +56,9 @@ func NewRows(env gui.Env, nrows uint) []gui.Env { switch event := event.(type) { case gui.Resize: area = event.Rectangle - resize(area, rowHeights) + go resize(area, rowHeights) default: - multicast(event, eventss) // forward event to all rows + go multicast(event, eventss) // forward event to all rows } case drw := <-draws: // draw call from a row rh := rowHeight(area, drw.f) |