aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2024-02-12 06:26:18 -0600
committerRobin Jarry <robin@jarry.cc>2024-02-12 13:48:47 +0100
commitf001f65240f85f0af91703dbcc0b068c0797297a (patch)
treec3e7e60f6000137a766b0c2313ac4f27009fffa6 /lib
parent0fd5f4115792e706f73202d77fac404c0033333b (diff)
downloadaerc-f001f65240f85f0af91703dbcc0b068c0797297a.tar.gz
aerc-f001f65240f85f0af91703dbcc0b068c0797297a.zip
fill: replace tcell.Style with vaxis.Style
Replace the Fill implementation with vaxis style objects Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib')
-rw-r--r--lib/ui/context.go4
-rw-r--r--lib/ui/fill.go8
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/ui/context.go b/lib/ui/context.go
index f1cc2a95..12621c8a 100644
--- a/lib/ui/context.go
+++ b/lib/ui/context.go
@@ -43,7 +43,7 @@ func (ctx *Context) Subcontext(x, y, width, height int) *Context {
return &Context{win, x, y, ctx.onPopover}
}
-func (ctx *Context) SetCell(x, y int, ch rune, style tcell.Style) {
+func (ctx *Context) SetCell(x, y int, ch rune, style vaxis.Style) {
width, height := ctx.window.Size()
if x >= width || y >= height {
// no-op when dims are inadequate
@@ -53,7 +53,7 @@ func (ctx *Context) SetCell(x, y int, ch rune, style tcell.Style) {
Character: vaxis.Character{
Grapheme: string(ch),
},
- Style: tcell.VaxisStyle(style),
+ Style: style,
})
}
diff --git a/lib/ui/fill.go b/lib/ui/fill.go
index ff248905..eedb481e 100644
--- a/lib/ui/fill.go
+++ b/lib/ui/fill.go
@@ -1,15 +1,13 @@
package ui
-import (
- "github.com/gdamore/tcell/v2"
-)
+import "git.sr.ht/~rockorager/vaxis"
type Fill struct {
Rune rune
- Style tcell.Style
+ Style vaxis.Style
}
-func NewFill(f rune, s tcell.Style) Fill {
+func NewFill(f rune, s vaxis.Style) Fill {
return Fill{f, s}
}