3b89fdc14a8b9b4dc8d815b81349a8392aa25332 — Elias Naur a month ago 9816373
cmd/scatter: update gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
3 files changed, 6 insertions(+), 21 deletions(-)

M cmd/scatter/ui.go
M go.mod
M go.sum
M cmd/scatter/ui.go => cmd/scatter/ui.go +3 -20
@@ 17,6 17,7 @@ import (
 
 	"gioui.org/app"
 	"gioui.org/f32"
+	_ "gioui.org/font/gofont"
 	"gioui.org/gesture"
 	"gioui.org/io/key"
 	"gioui.org/io/pointer"


@@ 25,17 26,12 @@ import (
 	"gioui.org/op"
 	"gioui.org/op/paint"
 	"gioui.org/text"
-	"gioui.org/text/opentype"
 	"gioui.org/unit"
 	"gioui.org/widget"
 	"gioui.org/widget/material"
 	"golang.org/x/exp/shiny/iconvg"
 	"golang.org/x/exp/shiny/materialdesign/icons"
 
-	"golang.org/x/image/font/gofont/gobold"
-	"golang.org/x/image/font/gofont/goitalic"
-	"golang.org/x/image/font/gofont/gomono"
-	"golang.org/x/image/font/gofont/goregular"
 	"golang.org/x/image/font/sfnt"
 )
 


@@ 174,20 170,7 @@ var iconLib struct {
 }
 
 func uiMain() {
-	shaper := new(text.Shaper)
-	shaper.Register(text.Font{}, opentype.Must(
-		opentype.Parse(goregular.TTF),
-	))
-	shaper.Register(text.Font{Style: text.Italic}, opentype.Must(
-		opentype.Parse(goitalic.TTF),
-	))
-	shaper.Register(text.Font{Weight: text.Bold}, opentype.Must(
-		opentype.Parse(gobold.TTF),
-	))
-	shaper.Register(text.Font{Typeface: "mono"}, opentype.Must(
-		opentype.Parse(gomono.TTF),
-	))
-	theme = material.NewTheme(shaper)
+	theme = material.NewTheme()
 	theme.Color.Primary = rgb(0x3c98c6)
 	iconLib.create = mustIcon(icons.ContentCreate)
 	iconLib.send = mustIcon(icons.ContentSend)


@@ 439,7 422,7 @@ func (a *App) layoutTimings(gtx *layout.Context) {
 		in.Layout(gtx, func() {
 			txt := fmt.Sprintf("m: %d %s", mallocs, a.profile.Timings)
 			lbl := theme.Caption(txt)
-			lbl.Font.Typeface = "mono"
+			lbl.Font.Variant = "Mono"
 			lbl.Layout(gtx)
 		})
 	})

M go.mod => go.mod +1 -1
@@ 3,7 3,7 @@ module scatter.im
 go 1.13
 
 require (
-	gioui.org v0.0.0-20191012123625-abb99eca5c54
+	gioui.org v0.0.0-20191013162339-8cd4c2e5de65
 	github.com/eliasnaur/libsignal-protocol-go v0.0.0-20190626062856-3295f72b181e
 	github.com/emersion/go-imap v1.0.0-rc.1
 	github.com/emersion/go-imap-idle v0.0.0-20190519112320-2704abd7050e

M go.sum => go.sum +2 -0
@@ 1,6 1,8 @@
 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
 gioui.org v0.0.0-20191012123625-abb99eca5c54 h1:1LQMwF6UgHRaAbwvoaKWmnv5LwKt2HyXJooDvkNkmRg=
 gioui.org v0.0.0-20191012123625-abb99eca5c54/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
+gioui.org v0.0.0-20191013162339-8cd4c2e5de65 h1:94lyVLRIPhu95x3goGooL3ZxkDZgo9dRgR6Unecwre0=
+gioui.org v0.0.0-20191013162339-8cd4c2e5de65/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
 github.com/RadicalApp/complete v0.0.0-20170329192659-17e6c0ee499b h1:cAULFohNVfNzco0flF4okSPg3s7/tCj+hMIldtYZo4c=
 github.com/RadicalApp/complete v0.0.0-20170329192659-17e6c0ee499b/go.mod h1:zZ3+l0EkpT2ZPnoamPBG50PBUtQrXwwyJ6elQZMmqgk=