Fix incorrect TabbedPanels colors

Resolves #46.
This commit is contained in:
Trevor Slocum 2020-12-28 10:08:08 -08:00
parent 1af0da7606
commit c34e095461
4 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,6 @@
v1.5.3 (WIP)
- Document how to prevent screen artifacts when using SetBackgroundTransparent
- Fix incorrect TabbedPanels colors
v1.5.2 (2020-12-04)
- Handle input events before executing queued update functions

2
go.mod
View File

@ -8,6 +8,6 @@ require (
github.com/mattn/go-runewidth v0.0.9
github.com/rivo/uniseg v0.2.0
gitlab.com/tslocum/cbind v0.1.4
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e // indirect
golang.org/x/sys v0.0.0-20201223074533-0d417f636930 // indirect
golang.org/x/text v0.3.4 // indirect
)

4
go.sum
View File

@ -14,8 +14,8 @@ gitlab.com/tslocum/cbind v0.1.4 h1:cbZXPPcieXspk8cShoT6efz7HAT8yMNQcofYWNizis4=
gitlab.com/tslocum/cbind v0.1.4/go.mod h1:RvwYE3auSjBNlCmWeGspzn+jdLUVQ8C2QGC+0nP9ChI=
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e h1:AyodaIpKjppX+cBfTASF2E1US3H2JFBj920Ot3rtDjs=
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201223074533-0d417f636930 h1:vRgIt+nup/B/BwIS0g2oC0haq0iqbV3ZA+u6+0TlNCo=
golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=

View File

@ -58,10 +58,15 @@ func NewTabbedPanels() *TabbedPanels {
s.SetWrap(true)
s.SetWordWrap(true)
s.SetHighlightedFunc(func(added, removed, remaining []string) {
if len(added) == 0 {
return
}
t.SetCurrentTab(added[0])
if t.setFocus != nil {
t.setFocus(t.panels)
}
s.Highlight()
})
t.rebuild()