Use bold instead of inverted for header names

This commit is contained in:
Drew DeVault 2019-03-30 15:59:42 -04:00
parent 337dd18c9c
commit 78db7ccafa

View file

@ -205,7 +205,7 @@ type HeaderView struct {
} }
func (hv *HeaderView) Draw(ctx *ui.Context) { func (hv *HeaderView) Draw(ctx *ui.Context) {
size := runewidth.StringWidth(" " + hv.Name + " ") size := runewidth.StringWidth(hv.Name)
var style tcell.Style var style tcell.Style
if hv.Name == "PGP" { if hv.Name == "PGP" {
style = tcell.StyleDefault.Foreground(tcell.ColorGreen) style = tcell.StyleDefault.Foreground(tcell.ColorGreen)
@ -213,7 +213,8 @@ func (hv *HeaderView) Draw(ctx *ui.Context) {
style = tcell.StyleDefault style = tcell.StyleDefault
} }
ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', style) ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', style)
ctx.Printf(0, 0, tcell.StyleDefault.Reverse(true), " "+hv.Name+" ") ctx.Printf(0, 0,
tcell.StyleDefault.Bold(true), hv.Name)
ctx.Printf(size, 0, style, " "+hv.Value) ctx.Printf(size, 0, style, " "+hv.Value)
} }