From 4830acbae283d5f88b8e65aa187c054203fe4f20 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 11 Apr 2023 21:48:31 +0200 Subject: Align editors in the middle --- go/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go/main.go b/go/main.go index d055aa8..aad9a29 100644 --- a/go/main.go +++ b/go/main.go @@ -93,12 +93,14 @@ func (l *Limox) draw(e system.FrameEvent) { layout.Rigid( func(gtx layout.Context) layout.Dimensions { jid := material.Editor(l.Theme, &l.JidEditor, "user@example.com") + jid.Editor.Alignment = text.Middle return jid.Layout(gtx) }, ), layout.Rigid( func(gtx layout.Context) layout.Dimensions { pwd := material.Editor(l.Theme, &l.PwdEditor, "mySafePassword") + pwd.Editor.Alignment = text.Middle pwd.Editor.Mask = '*' return pwd.Layout(gtx) }, -- cgit v1.2.3-70-g09d2