richtext: make interactive spans obey constraints This commit fixes a bug which used the wrong copy of the gtx when laying out interactive spans, resulting in their hit areas being massively inflated. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
1 files changed, 1 insertions(+), 1 deletions(-) M richtext/richtext.go
M richtext/richtext.go => richtext/richtext.go +1 -1
@@ 218,7 218,7 @@ func (t TextStyle) Layout(gtx layout.Context) layout.Dimensions { text := styledtext.Text(t.Shaper, styles...) text.Alignment = t.Alignment return text.Layout(gtx, func(_ layout.Context, i int, _ layout.Dimensions) { return text.Layout(gtx, func(gtx layout.Context, i int, _ layout.Dimensions) { span := &t.Styles[i] if !span.Interactive { return