From 0a696233d721c64d1bb53c7429624313113fa6f5 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Wed, 17 Jan 2024 15:47:12 -0500 Subject: fix input widget registering backspace when unfocused --- gui/widget/text.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gui/widget/text.go') diff --git a/gui/widget/text.go b/gui/widget/text.go index cb66a0a..4723eda 100644 --- a/gui/widget/text.go +++ b/gui/widget/text.go @@ -45,12 +45,11 @@ func drawText(text []byte, dst draw.Image, r image.Rectangle) { Dot: fixed.P(0, 0), } - bounds := textBounds(text, drawer) - // background draw.Draw(dst, r, BG_COLOR, image.ZP, draw.Src) // text image + bounds := textBounds(text, drawer) textImg := image.NewRGBA(bounds) draw.Draw(textImg, bounds, BG_COLOR, image.ZP, draw.Src) drawer.Dst = textImg -- cgit v1.2.3