~eliasnaur/gio

99080023e449345a116b4f130fcf90685e8b3cb3 — Elias Naur 8 days ago dac8ffc
example,cmd: bump gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
M cmd/go.mod => cmd/go.mod +1 -1
@@ 3,7 3,7 @@ module gioui.org/cmd
go 1.13

require (
	gioui.org v0.0.0-20200517174812-03db2817ace9
	gioui.org v0.0.0-20200519075807-7bf3265ccd38
	github.com/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4
	github.com/chromedp/chromedp v0.5.2
	golang.org/x/image v0.0.0-20190802002840-cff245a6509b

M cmd/go.sum => cmd/go.sum +2 -2
@@ 1,6 1,6 @@
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gioui.org v0.0.0-20200517174812-03db2817ace9 h1:Yn2L9d5GM6Bc6LXcTbB5Pyv4QBtCQmoaZCFmMw1adg0=
gioui.org v0.0.0-20200517174812-03db2817ace9/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
gioui.org v0.0.0-20200519075807-7bf3265ccd38 h1:Y0ZhfGhZIrdG14jY4az4js7ebwHLJgxO0+liR0JE5IY=
gioui.org v0.0.0-20200519075807-7bf3265ccd38/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4 h1:QD3KxSJ59L2lxG6MXBjNHxiQO2RmxTQ3XcK+wO44WOg=

M cmd/gogio/testdata/red.go => cmd/gogio/testdata/red.go +3 -3
@@ 112,12 112,12 @@ func (w *quarterWidget) Layout(gtx *layout.Context) {
		paint.ColorOp{Color: w.color}.Add(gtx.Ops)
	}
	paint.PaintOp{Rect: f32.Rectangle{Max: f32.Point{
		X: float32(gtx.Constraints.Width.Max),
		Y: float32(gtx.Constraints.Height.Max),
		X: float32(gtx.Constraints.Max.X),
		Y: float32(gtx.Constraints.Max.Y),
	}}}.Add(gtx.Ops)

	pointer.Rect(image.Rectangle{
		Max: image.Pt(gtx.Constraints.Width.Max, gtx.Constraints.Height.Max),
		Max: image.Pt(gtx.Constraints.Max.X, gtx.Constraints.Max.Y),
	}).Add(gtx.Ops)
	pointer.InputOp{Tag: w}.Add(gtx.Ops)


M example/go.mod => example/go.mod +1 -1
@@ 3,7 3,7 @@ module gioui.org/example
go 1.13

require (
	gioui.org v0.0.0-20200517174812-03db2817ace9
	gioui.org v0.0.0-20200519081211-dac8ffc00271
	github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7
	github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72
	github.com/google/go-github/v24 v24.0.1

M example/go.sum => example/go.sum +2 -2
@@ 1,7 1,7 @@
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gioui.org v0.0.0-20200517174812-03db2817ace9 h1:Yn2L9d5GM6Bc6LXcTbB5Pyv4QBtCQmoaZCFmMw1adg0=
gioui.org v0.0.0-20200517174812-03db2817ace9/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
gioui.org v0.0.0-20200519081211-dac8ffc00271 h1:k6uQmSxxr5nVPQCYlWtjzzvMrlBYsF9II++Jj5bDbB8=
gioui.org v0.0.0-20200519081211-dac8ffc00271/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7 h1:SCYMcCJ89LjRGwEa0tRluNRiMjZHalQZrVrvTbPh+qw=
github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7/go.mod h1:482civXOzJJCPzJ4ZOX/pwvXBWSnzD4OKMdH4ClKGbk=

M example/gophers/ui.go => example/gophers/ui.go +11 -11
@@ 177,12 177,12 @@ func (up *userPage) commit(gtx *layout.Context, index int) {
				sz := gtx.Px(unit.Dp(48))
				cc := clipCircle{}
				cc.Layout(gtx, func() {
					gtx.Constraints = layout.RigidConstraints(gtx.Constraints.Constrain(image.Point{X: sz, Y: sz}))
					gtx.Constraints = layout.Exact(gtx.Constraints.Constrain(image.Point{X: sz, Y: sz}))
					u.layoutAvatar(gtx)
				})
			}),
			layout.Flexed(1, func() {
				gtx.Constraints.Width.Min = gtx.Constraints.Width.Max
				gtx.Constraints.Min.X = gtx.Constraints.Max.X
				layout.Inset{Left: unit.Dp(8)}.Layout(gtx, func() {
					label.Layout(gtx)
				})


@@ 196,16 196,16 @@ func (u *UI) layoutUsers(gtx *layout.Context) {
		layout.Expanded(func() {
			layout.Flex{Axis: layout.Vertical}.Layout(gtx,
				layout.Rigid(func() {
					gtx.Constraints.Width.Min = gtx.Constraints.Width.Max
					gtx.Constraints.Min.X = gtx.Constraints.Max.X
					layout.UniformInset(unit.Dp(16)).Layout(gtx, func() {
						sz := gtx.Px(unit.Dp(200))
						cs := gtx.Constraints
						gtx.Constraints = layout.RigidConstraints(cs.Constrain(image.Point{X: sz, Y: sz}))
						gtx.Constraints = layout.Exact(cs.Constrain(image.Point{X: sz, Y: sz}))
						material.Editor(theme, "Hint").Layout(gtx, u.edit)
					})
				}),
				layout.Rigid(func() {
					gtx.Constraints.Width.Min = gtx.Constraints.Width.Max
					gtx.Constraints.Min.X = gtx.Constraints.Max.X
					in := layout.Inset{Bottom: unit.Dp(16), Left: unit.Dp(16), Right: unit.Dp(16)}
					in.Layout(gtx, func() {
						e := material.Editor(theme, "Hint")


@@ 217,7 217,7 @@ func (u *UI) layoutUsers(gtx *layout.Context) {
				layout.Rigid(func() {
					layout.Stack{}.Layout(gtx,
						layout.Expanded(func() {
							gtx.Constraints.Width.Min = gtx.Constraints.Width.Max
							gtx.Constraints.Min.X = gtx.Constraints.Max.X
							fill{rgb(0xf2f2f2)}.Layout(gtx)
						}),
						layout.Stacked(func() {


@@ 231,7 231,7 @@ func (u *UI) layoutUsers(gtx *layout.Context) {
					)
				}),
				layout.Flexed(1, func() {
					gtx.Constraints.Width.Min = gtx.Constraints.Width.Max
					gtx.Constraints.Min.X = gtx.Constraints.Max.X
					u.layoutContributors(gtx)
				}),
			)


@@ 269,7 269,7 @@ func (u *UI) user(gtx *layout.Context, index int) {
					cc.Layout(gtx, func() {
						dim := gtx.Px(unit.Dp(48))
						sz := image.Point{X: dim, Y: dim}
						gtx.Constraints = layout.RigidConstraints(gtx.Constraints.Constrain(sz))
						gtx.Constraints = layout.Exact(gtx.Constraints.Constrain(sz))
						user.layoutAvatar(gtx)
					})
				})


@@ 282,7 282,7 @@ func (u *UI) user(gtx *layout.Context, index int) {
								material.Body1(theme, user.name).Layout(gtx)
							}),
							layout.Flexed(1, func() {
								gtx.Constraints.Width.Min = gtx.Constraints.Width.Max
								gtx.Constraints.Min.X = gtx.Constraints.Max.X
								layout.E.Layout(gtx, func() {
									layout.Inset{Left: unit.Dp(2)}.Layout(gtx, func() {
										material.Caption(theme, "3 hours ago").Layout(gtx)


@@ 309,7 309,7 @@ func (u *UI) user(gtx *layout.Context, index int) {
}

func (u *user) layoutAvatar(gtx *layout.Context) {
	sz := gtx.Constraints.Width.Min
	sz := gtx.Constraints.Min.X
	if u.avatarOp.Size().X != sz {
		img := image.NewRGBA(image.Rectangle{Max: image.Point{X: sz, Y: sz}})
		draw.ApproxBiLinear.Scale(img, img.Bounds(), u.avatar, u.avatar.Bounds(), draw.Src, nil)


@@ 326,7 326,7 @@ type fill struct {

func (f fill) Layout(gtx *layout.Context) {
	cs := gtx.Constraints
	d := image.Point{X: cs.Width.Min, Y: cs.Height.Min}
	d := cs.Min
	dr := f32.Rectangle{
		Max: f32.Point{X: float32(d.X), Y: float32(d.Y)},
	}

M example/kitchen/kitchen.go => example/kitchen/kitchen.go +1 -1
@@ 189,7 189,7 @@ func kitchen(gtx *layout.Context, th *material.Theme) {
			material.H3(th, topLabel).Layout(gtx)
		},
		func() {
			gtx.Constraints.Height.Max = gtx.Px(unit.Dp(200))
			gtx.Constraints.Max.Y = gtx.Px(unit.Dp(200))
			material.Editor(th, "Hint").Layout(gtx, editor)
		},
		func() {

M example/tabs/tabs.go => example/tabs/tabs.go +1 -1
@@ 125,7 125,7 @@ func drawTabs(gtx *layout.Context, th *material.Theme) {

func bounds(gtx *layout.Context) f32.Rectangle {
	cs := gtx.Constraints
	d := image.Point{X: cs.Width.Min, Y: cs.Height.Min}
	d := cs.Min
	return f32.Rectangle{
		Max: f32.Point{X: float32(d.X), Y: float32(d.Y)},
	}