aerc/lib/ui/fill.go
Tim Culverhouse ba24e92062 invalidatable: cleanup dead code
Remove invalidatable type and all associated calls. All items can
directly invalidate the UI.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-10-12 22:16:40 +02:00

27 lines
377 B
Go

package ui
import (
"github.com/gdamore/tcell/v2"
)
type Fill struct {
Rune rune
Style tcell.Style
}
func NewFill(f rune, s tcell.Style) Fill {
return Fill{f, s}
}
func (f Fill) Draw(ctx *Context) {
for x := 0; x < ctx.Width(); x += 1 {
for y := 0; y < ctx.Height(); y += 1 {
ctx.SetCell(x, y, f.Rune, f.Style)
}
}
}
func (f Fill) Invalidate() {
// no-op
}