mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
widget/material: use simpler clip.Rect for Clickable clip region
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -90,9 +90,7 @@ func Clickable(gtx layout.Context, button *widget.Clickable, w layout.Widget) la
|
|||||||
return layout.Stack{}.Layout(gtx,
|
return layout.Stack{}.Layout(gtx,
|
||||||
layout.Expanded(button.Layout),
|
layout.Expanded(button.Layout),
|
||||||
layout.Expanded(func(gtx layout.Context) layout.Dimensions {
|
layout.Expanded(func(gtx layout.Context) layout.Dimensions {
|
||||||
clip.RRect{
|
clip.Rect{Max: gtx.Constraints.Min}.Add(gtx.Ops)
|
||||||
Rect: f32.Rectangle{Max: layout.FPt(gtx.Constraints.Min)},
|
|
||||||
}.Add(gtx.Ops)
|
|
||||||
for _, c := range button.History() {
|
for _, c := range button.History() {
|
||||||
drawInk(gtx, c)
|
drawInk(gtx, c)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user