diff options
author | xengineering <me@xengineering.eu> | 2023-07-09 17:49:42 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-07-09 17:49:42 +0200 |
commit | 17301c7a8bc6a5a0663d302b061fbbdfff12e73f (patch) | |
tree | 7c9b16bdda62041d56bb40b3796432653f433c42 /gui.go | |
parent | 512f32b750d8fccbe5c4de8a2234fb00cd27cb1a (diff) | |
download | limox-17301c7a8bc6a5a0663d302b061fbbdfff12e73f.tar limox-17301c7a8bc6a5a0663d302b061fbbdfff12e73f.tar.zst limox-17301c7a8bc6a5a0663d302b061fbbdfff12e73f.zip |
WIP: Implement roster list display
Diffstat (limited to 'gui.go')
-rw-r--r-- | gui.go | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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, |