aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ui/context.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2024-02-12 06:26:20 -0600
committerRobin Jarry <robin@jarry.cc>2024-02-12 13:48:50 +0100
commita60f2c19a0a962167067547c2a74988012cf2f44 (patch)
treee3c98d3d0f7ac934eb6ee0c4cb19b1a1377cc2a8 /lib/ui/context.go
parentcdc90afbaa1a6ff7d0900b6ce904a1e51e31bcd1 (diff)
downloadaerc-a60f2c19a0a962167067547c2a74988012cf2f44.tar.gz
style: use vaxis style everywhere
Replace all tcell.Style objects with vaxis.Style objects Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/ui/context.go')
-rw-r--r--lib/ui/context.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ui/context.go b/lib/ui/context.go
index 12621c8a..69361120 100644
--- a/lib/ui/context.go
+++ b/lib/ui/context.go
@@ -57,7 +57,7 @@ func (ctx *Context) SetCell(x, y int, ch rune, style vaxis.Style) {
})
}
-func (ctx *Context) Printf(x, y int, style tcell.Style,
+func (ctx *Context) Printf(x, y int, style vaxis.Style,
format string, a ...interface{},
) int {
width, height := ctx.window.Size()
@@ -93,7 +93,7 @@ func (ctx *Context) Printf(x, y int, style tcell.Style,
Grapheme: string(sr.Value),
Width: sr.Width,
},
- Style: tcell.VaxisStyle(sr.Style),
+ Style: sr.Style,
})
x += sr.Width
if x == old_x+width {
@@ -107,14 +107,14 @@ func (ctx *Context) Printf(x, y int, style tcell.Style,
return buf.Len()
}
-func (ctx *Context) Fill(x, y, width, height int, rune rune, style tcell.Style) {
+func (ctx *Context) Fill(x, y, width, height int, rune rune, style vaxis.Style) {
win := ctx.window.New(x, y, width, height)
win.Fill(vaxis.Cell{
Character: vaxis.Character{
Grapheme: string(rune),
Width: 1,
},
- Style: tcell.VaxisStyle(style),
+ Style: style,
})
}