example: update to latest Gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-11-05 16:29:23 +01:00
parent 94d242d18c
commit edaa112c40
5 changed files with 26 additions and 42 deletions
+3 -4
View File
@@ -327,11 +327,10 @@ type fill struct {
func (f fill) Layout(gtx layout.Context) layout.Dimensions {
cs := gtx.Constraints
d := cs.Min
dr := f32.Rectangle{
Max: f32.Point{X: float32(d.X), Y: float32(d.Y)},
dr := image.Rectangle{
Max: image.Point{X: d.X, Y: d.Y},
}
paint.ColorOp{Color: f.col}.Add(gtx.Ops)
paint.PaintOp{Rect: dr}.Add(gtx.Ops)
paint.FillShape(gtx.Ops, f.col, clip.Rect(dr).Op())
return layout.Dimensions{Size: d}
}