~whereswaldon/gio-x

8b84dabf32e328706027ccc6e44d3174001f2d05 — Elias Naur 2 years ago 26f23a1
outlay,richtext: replace calls to deprecated clip.Op.Add

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2 files changed, 2 insertions(+), 2 deletions(-)

M outlay/table.go
M richtext/richtext.go
M outlay/table.go => outlay/table.go +1 -1
@@ 71,7 71,7 @@ func (t *Table) Layout(gtx layout.Context, xn, yn int, el Cell) layout.Dimension
	pr.Pop()

	// Offset the start position for truncated last columns and rows.
	clip.Rect(image.Rectangle{Max: csMax}).Add(gtx.Ops)
	defer clip.Rect(image.Rectangle{Max: csMax}).Push(gtx.Ops).Pop()
	p := image.Point{
		X: -t.xList.Position.Offset,
		Y: -t.yList.Position.Offset,

M richtext/richtext.go => richtext/richtext.go +1 -1
@@ 183,7 183,7 @@ func (ss SpanStyle) Layout(gtx layout.Context, s text.Shaper, shape spanShape) l
	defer op.Save(gtx.Ops).Load()
	paint.ColorOp{Color: ss.Color}.Add(gtx.Ops)
	op.Offset(layout.FPt(shape.offset)).Add(gtx.Ops)
	s.Shape(ss.Font, fixed.I(gtx.Px(ss.Size)), shape.layout).Add(gtx.Ops)
	defer s.Shape(ss.Font, fixed.I(gtx.Px(ss.Size)), shape.layout).Push(gtx.Ops).Pop()
	paint.PaintOp{}.Add(gtx.Ops)
	return layout.Dimensions{Size: shape.size}
}