From 17301c7a8bc6a5a0663d302b061fbbdfff12e73f Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 9 Jul 2023 17:49:42 +0200 Subject: WIP: Implement roster list display --- gui.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gui.go') diff --git a/gui.go b/gui.go index 3f0e42e..4b899e4 100644 --- a/gui.go +++ b/gui.go @@ -7,6 +7,7 @@ import ( "gioui.org/io/system" "gioui.org/layout" "gioui.org/text" + "gioui.org/widget" "gioui.org/widget/material" ) @@ -36,6 +37,25 @@ func (l *Limox) rosterView(e system.FrameEvent) { } flex.Layout(gtx, + + layout.Rigid( + func(gtx layout.Context) layout.Dimensions { + wl := widget.List{ + List: layout.List{ + Axis: layout.Vertical, + }, + } + ml := material.List(l.Theme, wl) + return list.Layout(gtx, len(widgets), func(gtx layout.Context, i int) layout.Dimensions { + return layout.UniformInset(unit.Dp(16)).Layout(gtx, widgets[i]) + }) + }, + ), + +// l := material.List(th, list).Layout(gtx, len(widgets), func(gtx C, i int) D { +// return layout.UniformInset(unit.Dp(16)).Layout(gtx, widgets[i]) +// } + layout.Rigid( func(gtx layout.Context) layout.Dimensions { btn := material.Button(l.Theme, &l.DisconnectButton, -- cgit v1.2.3-70-g09d2