diff options
| author | xengineering <me@xengineering.eu> | 2023-04-11 21:15:27 +0200 | 
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2023-04-11 21:15:27 +0200 | 
| commit | 7430798f239642813d5695baefb6066c28ed2f56 (patch) | |
| tree | 2a074c9a64a9879863bd1edf4c617f40aab286bb | |
| parent | 58c8ae6edee39192589d9e754c053c4cf2b9d961 (diff) | |
| download | limox-7430798f239642813d5695baefb6066c28ed2f56.tar limox-7430798f239642813d5695baefb6066c28ed2f56.tar.zst limox-7430798f239642813d5695baefb6066c28ed2f56.zip | |
Add editor widgets for JID and password
These are needed to provide credentials.
| -rw-r--r-- | go/main.go | 24 | 
1 files changed, 19 insertions, 5 deletions
| @@ -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)  			},  		), | 
