summaryrefslogtreecommitdiff
path: root/go/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/main.go')
-rw-r--r--go/main.go24
1 files changed, 19 insertions, 5 deletions
diff --git a/go/main.go b/go/main.go
index 859b8e6..108ebc9 100644
--- a/go/main.go
+++ b/go/main.go
@@ -17,10 +17,12 @@ import (
)
type Limox struct {
- Button widget.Clickable
- Window *app.Window
- Operations op.Ops
- Theme *material.Theme
+ JidEditor widget.Editor
+ PwdEditor widget.Editor
+ ConnectClickable widget.Clickable
+ Window *app.Window
+ Operations op.Ops
+ Theme *material.Theme
}
func main() {
@@ -79,7 +81,19 @@ func (l *Limox) draw(e system.FrameEvent) {
),
layout.Rigid(
func(gtx layout.Context) layout.Dimensions {
- btn := material.Button(l.Theme, &l.Button, "connect")
+ jid := material.Editor(l.Theme, &l.JidEditor, "user@example.com")
+ return jid.Layout(gtx)
+ },
+ ),
+ layout.Rigid(
+ func(gtx layout.Context) layout.Dimensions {
+ pwd := material.Editor(l.Theme, &l.PwdEditor, "mySafePassword")
+ return pwd.Layout(gtx)
+ },
+ ),
+ layout.Rigid(
+ func(gtx layout.Context) layout.Dimensions {
+ btn := material.Button(l.Theme, &l.ConnectClickable, "connect")
return btn.Layout(gtx)
},
),