diff options
author | xengineering <me@xengineering.eu> | 2023-07-09 17:38:57 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-07-09 17:38:57 +0200 |
commit | 512f32b750d8fccbe5c4de8a2234fb00cd27cb1a (patch) | |
tree | 0bb78264170b7bc7955e014d42347754a079aa28 /gui.go | |
parent | 3f5e695e6d772f46ef3596f83c9d2c26ebcbab35 (diff) | |
download | limox-512f32b750d8fccbe5c4de8a2234fb00cd27cb1a.tar limox-512f32b750d8fccbe5c4de8a2234fb00cd27cb1a.tar.zst limox-512f32b750d8fccbe5c4de8a2234fb00cd27cb1a.zip |
Create layout.Widget per roster item
This is needed to use these widgets to form a list.
Diffstat (limited to 'gui.go')
-rw-r--r-- | gui.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 { |