op: rename StackOp/Push/Pop to StateOp/Save/Load

The semantics were relaxed in a previous commit; this change renames
to operations accordingly.

API change. Use gofmt to adjust your code accordingly:

gofmt -r 'op.Push(a).Pop() -> op.Save(a).Load()'
gofmt -r 'op.Push(a) -> op.Save(a)'
gofmt -r 'v.Pop() -> v.Load()'
gofmt -r 'op.StackOp -> op.StateOp'

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-01-12 20:48:41 +01:00
parent ae2c74ec13
commit d331dd2de8
25 changed files with 177 additions and 177 deletions
+2 -2
View File
@@ -110,12 +110,12 @@ func (l Label) Layout(gtx layout.Context, s text.Shaper, font text.Font, size un
if !ok {
break
}
stack := op.Push(gtx.Ops)
stack := op.Save(gtx.Ops)
op.Offset(layout.FPt(off)).Add(gtx.Ops)
s.Shape(font, textSize, l).Add(gtx.Ops)
clip.Rect(cl.Sub(off)).Add(gtx.Ops)
paint.PaintOp{}.Add(gtx.Ops)
stack.Pop()
stack.Load()
}
return dims
}