From 03650474e2190ef6e54413d433b3d1f63dc9993e Mon Sep 17 00:00:00 2001 From: y0ast Date: Mon, 30 Nov 2020 22:07:03 +0000 Subject: 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. --- lib/ui/borders.go | 2 +- lib/ui/context.go | 4 ++-- lib/ui/fill.go | 2 +- lib/ui/grid.go | 2 +- lib/ui/interfaces.go | 2 +- lib/ui/popover.go | 2 +- lib/ui/stack.go | 2 +- lib/ui/tab.go | 2 +- lib/ui/text.go | 2 +- lib/ui/textinput.go | 2 +- lib/ui/ui.go | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/ui') diff --git a/lib/ui/borders.go b/lib/ui/borders.go index 99d6880..fd49e7f 100644 --- a/lib/ui/borders.go +++ b/lib/ui/borders.go @@ -1,7 +1,7 @@ package ui import ( - "github.com/gdamore/tcell" + "github.com/gdamore/tcell/v2" "git.sr.ht/~sircmpwn/aerc/config" ) diff --git a/lib/ui/context.go b/lib/ui/context.go index 6bdf76a..7936f35 100644 --- a/lib/ui/context.go +++ b/lib/ui/context.go @@ -3,8 +3,8 @@ package ui import ( "fmt" - "github.com/gdamore/tcell" - "github.com/gdamore/tcell/views" + "github.com/gdamore/tcell/v2" + "github.com/gdamore/tcell/v2/views" "github.com/mattn/go-runewidth" ) diff --git a/lib/ui/fill.go b/lib/ui/fill.go index 4d36478..0ab4f74 100644 --- a/lib/ui/fill.go +++ b/lib/ui/fill.go @@ -1,7 +1,7 @@ package ui import ( - "github.com/gdamore/tcell" + "github.com/gdamore/tcell/v2" ) type Fill rune diff --git a/lib/ui/grid.go b/lib/ui/grid.go index cff5577..f505ce0 100644 --- a/lib/ui/grid.go +++ b/lib/ui/grid.go @@ -6,7 +6,7 @@ import ( "sync" "sync/atomic" - "github.com/gdamore/tcell" + "github.com/gdamore/tcell/v2" ) type Grid struct { diff --git a/lib/ui/interfaces.go b/lib/ui/interfaces.go index 1f2f284..7e11725 100644 --- a/lib/ui/interfaces.go +++ b/lib/ui/interfaces.go @@ -1,7 +1,7 @@ package ui import ( - "github.com/gdamore/tcell" + "github.com/gdamore/tcell/v2" ) // Drawable is a UI component that can draw. Unless specified, all methods must diff --git a/lib/ui/popover.go b/lib/ui/popover.go index a76f222..7a539de 100644 --- a/lib/ui/popover.go +++ b/lib/ui/popover.go @@ -1,6 +1,6 @@ package ui -import "github.com/gdamore/tcell" +import "github.com/gdamore/tcell/v2" type Popover struct { x, y, width, height int diff --git a/lib/ui/stack.go b/lib/ui/stack.go index c9004a0..5371408 100644 --- a/lib/ui/stack.go +++ b/lib/ui/stack.go @@ -5,7 +5,7 @@ import ( "git.sr.ht/~sircmpwn/aerc/config" - "github.com/gdamore/tcell" + "github.com/gdamore/tcell/v2" ) type Stack struct { diff --git a/lib/ui/tab.go b/lib/ui/tab.go index cd5f448..2cd8828 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -3,7 +3,7 @@ package ui import ( "io" - "github.com/gdamore/tcell" + "github.com/gdamore/tcell/v2" "github.com/mattn/go-runewidth" "git.sr.ht/~sircmpwn/aerc/config" diff --git a/lib/ui/text.go b/lib/ui/text.go index 455c2eb..ffae193 100644 --- a/lib/ui/text.go +++ b/lib/ui/text.go @@ -1,7 +1,7 @@ package ui import ( - "github.com/gdamore/tcell" + "github.com/gdamore/tcell/v2" "github.com/mattn/go-runewidth" ) diff --git a/lib/ui/textinput.go b/lib/ui/textinput.go index 2445065..e96499a 100644 --- a/lib/ui/textinput.go +++ b/lib/ui/textinput.go @@ -4,7 +4,7 @@ import ( "math" "time" - "github.com/gdamore/tcell" + "github.com/gdamore/tcell/v2" "github.com/mattn/go-runewidth" "git.sr.ht/~sircmpwn/aerc/config" diff --git a/lib/ui/ui.go b/lib/ui/ui.go index ee71f8e..66c2a05 100644 --- a/lib/ui/ui.go +++ b/lib/ui/ui.go @@ -3,7 +3,7 @@ package ui import ( "sync/atomic" - "github.com/gdamore/tcell" + "github.com/gdamore/tcell/v2" ) type UI struct { -- cgit 1.4.1-2-gfad0