widget: update Editor dimensions after input

Fixes gio#162

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-09-29 19:06:26 +02:00
parent 4bab6fcf32
commit d2e06d9389
2 changed files with 32 additions and 0 deletions
+1
View File
@@ -354,6 +354,7 @@ func (e *Editor) Layout(gtx layout.Context, sh text.Shaper, font text.Font, size
e.makeValid()
e.processEvents(gtx)
e.makeValid()
if viewSize := gtx.Constraints.Constrain(e.dims.Size); viewSize != e.viewSize {
e.viewSize = viewSize