~eliasnaur/gio

2bd539d2de51cb161b27ee0b06f138fa9d5038fe — Elias Naur 7 months ago b39d1bd
widget/material: use simpler clip.Rect for Clickable clip region

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

M widget/material/button.go
M widget/material/button.go => widget/material/button.go +1 -3
@@ 90,9 90,7 @@ func Clickable(gtx layout.Context, button *widget.Clickable, w layout.Widget) la
	return layout.Stack{}.Layout(gtx,
		layout.Expanded(button.Layout),
		layout.Expanded(func(gtx layout.Context) layout.Dimensions {
			clip.RRect{
				Rect: f32.Rectangle{Max: layout.FPt(gtx.Constraints.Min)},
			}.Add(gtx.Ops)
			clip.Rect{Max: gtx.Constraints.Min}.Add(gtx.Ops)
			for _, c := range button.History() {
				drawInk(gtx, c)
			}