Fix performance bug in list.Layout(...)

This commit is contained in:
Greg 2019-10-10 11:35:11 -04:00
parent 455a8960e5
commit 49ebf55b15

View File

@ -370,7 +370,7 @@ func eventLoop() {
w.Invalidate()
page = idPage
default:
li := func(i int) {
lst.Layout(gtx, len(passBtns), func(i int) {
btn := passBtns[i]
btn.Layout(gtx, family)
if btn.Clicked() {
@ -401,10 +401,7 @@ func eventLoop() {
}
}(pathnames[i])
}
}
for i := 0; i < len(passBtns); i++ {
lst.Layout(gtx, len(passBtns), li)
}
})
}
mux.Unlock()
})