From 512f32b750d8fccbe5c4de8a2234fb00cd27cb1a Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 9 Jul 2023 17:38:57 +0200 Subject: Create layout.Widget per roster item This is needed to use these widgets to form a list. --- gui.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gui.go b/gui.go index c3256eb..3f0e42e 100644 --- a/gui.go +++ b/gui.go @@ -27,6 +27,14 @@ func (l *Limox) rosterView(e system.FrameEvent) { Spacing: layout.SpaceStart, } + widgets := make([]layout.Widget, 0) + for _, v := range l.Roster { + widgets = append(widgets, func(gtx layout.Context) layout.Dimensions { + jid := material.H6(l.Theme, v.Jid) + return jid.Layout(gtx) + }) + } + flex.Layout(gtx, layout.Rigid( func(gtx layout.Context) layout.Dimensions { -- cgit v1.2.3-70-g09d2