diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-30 12:59:18 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-30 12:59:18 -0400 |
commit | 84965d680cff655c7734070ef93fd3c1e2177748 (patch) | |
tree | a77f59f78406a958795a14bf40292f31f25ddc24 /widgets/status.go | |
parent | 700dea23fa75f213af2f99449db994008eab9d21 (diff) | |
download | aerc-84965d680cff655c7734070ef93fd3c1e2177748.tar.gz |
Use tcell.Style.Reverse instead of black on white
Diffstat (limited to 'widgets/status.go')
-rw-r--r-- | widgets/status.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/widgets/status.go b/widgets/status.go index 7a746fa..3536760 100644 --- a/widgets/status.go +++ b/widgets/status.go @@ -24,8 +24,8 @@ type StatusMessage struct { func NewStatusLine() *StatusLine { return &StatusLine{ fallback: StatusMessage{ - bg: tcell.ColorWhite, - fg: tcell.ColorBlack, + bg: tcell.ColorDefault, + fg: tcell.ColorDefault, message: "Idle", }, } @@ -46,15 +46,16 @@ func (status *StatusLine) Draw(ctx *ui.Context) { if len(status.stack) != 0 { line = status.stack[len(status.stack)-1] } - style := tcell.StyleDefault.Background(line.bg).Foreground(line.fg) + style := tcell.StyleDefault. + Background(line.bg).Foreground(line.fg).Reverse(true) ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', style) ctx.Printf(0, 0, style, "%s", line.message) } func (status *StatusLine) Set(text string) *StatusMessage { status.fallback = StatusMessage{ - bg: tcell.ColorWhite, - fg: tcell.ColorBlack, + bg: tcell.ColorDefault, + fg: tcell.ColorDefault, message: text, } status.Invalidate() @@ -63,8 +64,8 @@ func (status *StatusLine) Set(text string) *StatusMessage { func (status *StatusLine) Push(text string, expiry time.Duration) *StatusMessage { msg := &StatusMessage{ - bg: tcell.ColorWhite, - fg: tcell.ColorBlack, + bg: tcell.ColorDefault, + fg: tcell.ColorDefault, message: text, } status.stack = append(status.stack, msg) |