summaryrefslogtreecommitdiff
path: root/gui.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-07-09 17:38:57 +0200
committerxengineering <me@xengineering.eu>2023-07-09 17:38:57 +0200
commit512f32b750d8fccbe5c4de8a2234fb00cd27cb1a (patch)
tree0bb78264170b7bc7955e014d42347754a079aa28 /gui.go
parent3f5e695e6d772f46ef3596f83c9d2c26ebcbab35 (diff)
downloadlimox-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.go8
1 files changed, 8 insertions, 0 deletions
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 {