Bump gio version. Add examples/fragment

This commit is contained in:
gmp
2020-06-19 14:08:20 -04:00
parent 267e2e1c33
commit 1e65963bd4
10 changed files with 308 additions and 14 deletions
+15 -13
View File
@@ -55,21 +55,23 @@ func eventloop() {
for { select {
case x := <-labchan:
labels = append(labels, material.Body1(th, x))
w.Invalidate()
case e := <-w.Events():
switch e := e.(type) {
case system.DestroyEvent:
return
case system.FrameEvent:
gtx := layout.NewContext(&ops, e)
resetSysinset(e.Insets)
sysinset.Layout(gtx, func(gtx C) D {
return margin.Layout(gtx, func(gtx C) D {
return list.Layout(gtx, len(labels), func(gtx C, i int) D {
return labels[i].Layout(gtx)
switch e := e.(type) {
case system.DestroyEvent:
return
case system.FrameEvent:
gtx := layout.NewContext(&ops, e)
resetSysinset(e.Insets)
sysinset.Layout(gtx, func(gtx C) D {
return margin.Layout(gtx, func(gtx C) D {
return list.Layout(gtx, len(labels), func(gtx C, i int) D {
return labels[i].Layout(gtx)
})
})
})
})
e.Frame(gtx.Ops)
e.Frame(gtx.Ops)
}
}
}}
}
}