mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
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:
+1
-1
@@ -37,7 +37,7 @@ func (e *Enum) Changed() bool {
|
||||
|
||||
// Layout adds the event handler for key.
|
||||
func (e *Enum) Layout(gtx layout.Context, key string) layout.Dimensions {
|
||||
defer op.Push(gtx.Ops).Pop()
|
||||
defer op.Save(gtx.Ops).Load()
|
||||
pointer.Rect(image.Rectangle{Max: gtx.Constraints.Min}).Add(gtx.Ops)
|
||||
|
||||
if index(e.values, key) == -1 {
|
||||
|
||||
Reference in New Issue
Block a user