aerc

Working clone of aerc-mail.org
git clone git://git.danielmoch.com/aerc.git
Log | Files | Refs | README | LICENSE

commit 404d0fe04da60b86e86467bf0d43c2f7089396fb
parent eabdcff8632fbb42ea75285d0c88add316db5c30
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Wed,  5 Jun 2019 16:53:03 -0400

WIP: UI colors

Diffstat:
Mlib/ui/borders.go | 2+-
Mlib/ui/tab.go | 4++--
Mwidgets/account-wizard.go | 2+-
Mwidgets/dirlist.go | 2+-
Mwidgets/msglist.go | 2+-
Mwidgets/msgviewer.go | 2+-
Mwidgets/status.go | 4++--
7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/ui/borders.go b/lib/ui/borders.go @@ -44,7 +44,7 @@ func (bordered *Bordered) Draw(ctx *Context) { y := 0 width := ctx.Width() height := ctx.Height() - style := tcell.StyleDefault.Reverse(true) + style := tcell.StyleDefault.Foreground(tcell.ColorOlive).Reverse(true) if bordered.borders&BORDER_LEFT != 0 { ctx.Fill(0, 0, 1, ctx.Height(), ' ', style) x += 1 diff --git a/lib/ui/tab.go b/lib/ui/tab.go @@ -114,14 +114,14 @@ func (tabs *Tabs) removeHistory(index int) { func (strip *TabStrip) Draw(ctx *Context) { x := 0 for i, tab := range strip.Tabs { - style := tcell.StyleDefault.Reverse(true) + style := tcell.StyleDefault.Foreground(tcell.ColorOlive).Reverse(true) if strip.Selected == i { style = tcell.StyleDefault } trunc := runewidth.Truncate(tab.Name, 32, "…") x += ctx.Printf(x, 0, style, " %s ", trunc) } - style := tcell.StyleDefault.Reverse(true) + style := tcell.StyleDefault.Foreground(tcell.ColorOlive).Reverse(true) ctx.Fill(x, 0, ctx.Width()-x, 1, ' ', style) } diff --git a/widgets/account-wizard.go b/widgets/account-wizard.go @@ -711,7 +711,7 @@ func (sel *selecter) Draw(ctx *ui.Context) { style := tcell.StyleDefault if sel.focus == i { if sel.focused { - style = style.Reverse(true) + style = style.Foreground(tcell.ColorOlive).Reverse(true) } else if sel.chooser { style = style.Bold(true) } diff --git a/widgets/dirlist.go b/widgets/dirlist.go @@ -114,7 +114,7 @@ func (dirlist *DirectoryList) Draw(ctx *ui.Context) { } style := tcell.StyleDefault if name == dirlist.selected { - style = style.Reverse(true) + style = style.Foreground(tcell.ColorBlue).Reverse(true) } ctx.Fill(0, row, ctx.Width(), 1, ' ', style) ctx.Printf(0, row, style, "%s", name) diff --git a/widgets/msglist.go b/widgets/msglist.go @@ -74,7 +74,7 @@ func (ml *MessageList) Draw(ctx *ui.Context) { style := tcell.StyleDefault if row == ml.selected-ml.scroll { - style = style.Reverse(true) + style = style.Foreground(tcell.ColorBlue).Reverse(true) } if _, ok := store.Deleted[msg.Uid]; ok { style = style.Foreground(tcell.ColorGray) diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go @@ -271,7 +271,7 @@ func (ps *PartSwitcher) Draw(ctx *ui.Context) { // TODO: cap height and add scrolling for messages with many parts y := ctx.Height() - height for i, part := range ps.parts { - style := tcell.StyleDefault.Reverse(ps.selected == i) + style := tcell.StyleDefault.Foreground(tcell.ColorOlive).Reverse(ps.selected == i) ctx.Fill(0, y+i, ctx.Width(), 1, ' ', style) name := fmt.Sprintf("%s/%s", strings.ToLower(part.part.MIMEType), diff --git a/widgets/status.go b/widgets/status.go @@ -24,7 +24,7 @@ func NewStatusLine() *StatusLine { return &StatusLine{ fallback: StatusMessage{ bg: tcell.ColorDefault, - fg: tcell.ColorDefault, + fg: tcell.ColorOlive, message: "Idle", }, } @@ -48,7 +48,7 @@ func (status *StatusLine) Draw(ctx *ui.Context) { func (status *StatusLine) Set(text string) *StatusMessage { status.fallback = StatusMessage{ bg: tcell.ColorDefault, - fg: tcell.ColorDefault, + fg: tcell.ColorOlive, message: text, } status.Invalidate()