diff --git a/cmd/passgo-gui/main.go b/cmd/passgo-gui/main.go index 5715edf..14123b2 100644 --- a/cmd/passgo-gui/main.go +++ b/cmd/passgo-gui/main.go @@ -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() })