all: use new rectangle and point convenience functions

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-05-19 10:39:20 +02:00
parent d82eb8fc66
commit 013ea395b4
11 changed files with 26 additions and 46 deletions
+2 -2
View File
@@ -130,7 +130,7 @@ func (in Inset) Layout(gtx *Context, w Widget) {
}
var stack op.StackOp
stack.Push(gtx.Ops)
op.TransformOp{}.Offset(toPointF(image.Point{X: left, Y: top})).Add(gtx.Ops)
op.TransformOp{}.Offset(FPt(image.Point{X: left, Y: top})).Add(gtx.Ops)
dims := ctxLayout(gtx, mcs, w)
stack.Pop()
gtx.Dimensions = Dimensions{
@@ -176,7 +176,7 @@ func (a Direction) Layout(gtx *Context, w Widget) {
}
var stack op.StackOp
stack.Push(gtx.Ops)
op.TransformOp{}.Offset(toPointF(p)).Add(gtx.Ops)
op.TransformOp{}.Offset(FPt(p)).Add(gtx.Ops)
macro.Add()
stack.Pop()
gtx.Dimensions = Dimensions{