mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +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:
+2
-2
@@ -24,7 +24,7 @@ func (b Border) Layout(gtx layout.Context, w layout.Widget) layout.Dimensions {
|
||||
dims := w(gtx)
|
||||
sz := dims.Size
|
||||
rr := float32(gtx.Px(b.CornerRadius))
|
||||
st := op.Push(gtx.Ops)
|
||||
st := op.Save(gtx.Ops)
|
||||
width := gtx.Px(b.Width)
|
||||
clip.Border{
|
||||
Rect: f32.Rectangle{
|
||||
@@ -35,6 +35,6 @@ func (b Border) Layout(gtx layout.Context, w layout.Widget) layout.Dimensions {
|
||||
}.Add(gtx.Ops)
|
||||
paint.ColorOp{Color: b.Color}.Add(gtx.Ops)
|
||||
paint.PaintOp{}.Add(gtx.Ops)
|
||||
st.Pop()
|
||||
st.Load()
|
||||
return dims
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user