aerc/lib/ui/fill.go
y0ast 03650474e2 update tcell to v2 and enable TrueColor support
Also update to the tcell v2 PaletteColor api, which should keep the chosen
theme of the user intact.

Note, that if $TRUECOLOR is defined and a truecolor given, aerc will now stop
clipping the value to one of the theme colors.
Generally this is desired behaviour though.
2020-12-18 07:23:22 +01:00

28 lines
403 B
Go

package ui
import (
"github.com/gdamore/tcell/v2"
)
type Fill rune
func NewFill(f rune) Fill {
return Fill(f)
}
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, rune(f), tcell.StyleDefault)
}
}
}
func (f Fill) OnInvalidate(callback func(d Drawable)) {
// no-op
}
func (f Fill) Invalidate() {
// no-op
}