~eliasnaur/gio-example

776bcc6bb54af70e8eb6cba24185494e19f936c4 — Chris Waldon 5 months ago c36baf9
gio-extras/{outlay,niotify}: fix gofmt

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
M gio-extras/niotify/hello.go => gio-extras/niotify/hello.go +18 -18
@@ 50,24 50,24 @@ func loop(w *app.Window) error {
			}
			gtx := layout.NewContext(&ops, e)
			layout.Inset{
    			Top: e.Insets.Top,
    			Bottom: e.Insets.Bottom,
    			Left: e.Insets.Left,
    			Right: e.Insets.Right,
				Top:    e.Insets.Top,
				Bottom: e.Insets.Bottom,
				Left:   e.Insets.Left,
				Right:  e.Insets.Right,
			}.Layout(gtx, func(gtx layout.Context) layout.Dimensions {

			return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
                              layout.Rigid(func(gtx layout.Context) layout.Dimensions {
                                           text := "notification errors will appear here"
                                           if err != nil {
                                               text = err.Error()
                                           }
                                   return material.Body1(th, text).Layout(gtx)
                              }),
                              layout.Flexed(1,func(gtx layout.Context) layout.Dimensions {
                                    return material.Button(th, &button, "Send Notification").Layout(gtx)
                              }),
                          )
				return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
					layout.Rigid(func(gtx layout.Context) layout.Dimensions {
						text := "notification errors will appear here"
						if err != nil {
							text = err.Error()
						}
						return material.Body1(th, text).Layout(gtx)
					}),
					layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
						return material.Button(th, &button, "Send Notification").Layout(gtx)
					}),
				)
			})
			e.Frame(gtx.Ops)
			if first {


@@ 78,8 78,8 @@ func loop(w *app.Window) error {
						log.Printf("manager creation failed: %v", e)
						err = e
					}
					for _ = range notificationRequests {
    						log.Println("trying to send notification")
					for range notificationRequests {
						log.Println("trying to send notification")
						notif, e := mgr.CreateNotification("hello!", "IS GIO OUT THERE?")
						if e != nil {
							log.Printf("notification send failed: %v", e)

M gio-extras/outlay/fan/main.go => gio-extras/outlay/fan/main.go +3 -3
@@ 8,6 8,9 @@ import (
	"time"

	"gioui.org/app"
	"gioui.org/example/gio-extras/outlay/fan/playing"
	xwidget "gioui.org/example/gio-extras/outlay/fan/widget"
	"gioui.org/example/gio-extras/outlay/fan/widget/boring"
	"gioui.org/font/gofont"
	"gioui.org/io/system"
	"gioui.org/layout"


@@ 16,9 19,6 @@ import (
	"gioui.org/widget"
	"gioui.org/widget/material"
	"git.sr.ht/~whereswaldon/outlay"
	"gioui.org/example/gio-extras/outlay/fan/playing"
	xwidget "gioui.org/example/gio-extras/outlay/fan/widget"
	"gioui.org/example/gio-extras/outlay/fan/widget/boring"
)

type (

M gio-extras/outlay/fan/widget/boring/cards.go => gio-extras/outlay/fan/widget/boring/cards.go +2 -2
@@ 4,13 4,13 @@ import (
	"image/color"
	"math"

	"gioui.org/example/gio-extras/outlay/fan/playing"
	xwidget "gioui.org/example/gio-extras/outlay/fan/widget"
	"gioui.org/f32"
	"gioui.org/layout"
	"gioui.org/op"
	"gioui.org/unit"
	"gioui.org/widget/material"
	"gioui.org/example/gio-extras/outlay/fan/playing"
	xwidget "gioui.org/example/gio-extras/outlay/fan/widget"
)

type (