Clear screen during re-layouts in example

Doing re-layout for changes in window size may leave coordinates that are now not painted over by any active components.  (I experienced this when updating the example to have the `ls` object take up 2 grid widths and be offset 1, for example.)  It's probably a good idea to pair big re-layout&re-draw operations with a `Clear` call.
This commit is contained in:
Eric Myhre 2016-03-28 13:48:41 -05:00
parent cede030c41
commit 2819e7ed4e

View File

@ -114,6 +114,7 @@ func main() {
ui.Handle("/sys/wnd/resize", func(e ui.Event) { ui.Handle("/sys/wnd/resize", func(e ui.Event) {
ui.Body.Width = ui.TermWidth() ui.Body.Width = ui.TermWidth()
ui.Body.Align() ui.Body.Align()
ui.Clear()
ui.Render(ui.Body) ui.Render(ui.Body)
}) })