summaryrefslogtreecommitdiff
path: root/gui.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-07-09 17:49:42 +0200
committerxengineering <me@xengineering.eu>2023-07-09 17:49:42 +0200
commit17301c7a8bc6a5a0663d302b061fbbdfff12e73f (patch)
tree7c9b16bdda62041d56bb40b3796432653f433c42 /gui.go
parent512f32b750d8fccbe5c4de8a2234fb00cd27cb1a (diff)
downloadlimox-17301c7a8bc6a5a0663d302b061fbbdfff12e73f.tar
limox-17301c7a8bc6a5a0663d302b061fbbdfff12e73f.tar.zst
limox-17301c7a8bc6a5a0663d302b061fbbdfff12e73f.zip
WIP: Implement roster list display
Diffstat (limited to 'gui.go')
-rw-r--r--gui.go20
1 files changed, 20 insertions, 0 deletions
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,