forked from joejulian/gio
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:
+2
-2
@@ -74,10 +74,10 @@ func (b *Clickable) History() []Press {
|
||||
|
||||
func (b *Clickable) Layout(gtx layout.Context) layout.Dimensions {
|
||||
b.update(gtx)
|
||||
stack := op.Push(gtx.Ops)
|
||||
stack := op.Save(gtx.Ops)
|
||||
pointer.Rect(image.Rectangle{Max: gtx.Constraints.Min}).Add(gtx.Ops)
|
||||
b.click.Add(gtx.Ops)
|
||||
stack.Pop()
|
||||
stack.Load()
|
||||
for len(b.history) > 0 {
|
||||
c := b.history[0]
|
||||
if c.End.IsZero() || gtx.Now.Sub(c.End) < 1*time.Second {
|
||||
|
||||
Reference in New Issue
Block a user