~eliasnaur/gio-example

4431f82ce4a9cc17ef3005655932d0db4736fe7f — Peter Sanford 7 months ago 852afe6
kitchen: respect system insets

This keeps the UI from rendering under the status bar on android.

Signed-off-by: Peter Sanford <psanford@sanford.io>
1 files changed, 8 insertions(+), 1 deletions(-)

M kitchen/kitchen.go
M kitchen/kitchen.go => kitchen/kitchen.go +8 -1
@@ 133,7 133,14 @@ func loop(w *app.Window) error {
					}
				}

				transformedKitchen(gtx, th)
				layout.Inset{
					Bottom: e.Insets.Bottom,
					Left:   e.Insets.Left,
					Right:  e.Insets.Right,
					Top:    e.Insets.Top,
				}.Layout(gtx, func(gtx C) D {
					return transformedKitchen(gtx, th)
				})
				e.Frame(gtx.Ops)
			}
		case p := <-progressIncrementer: