summaryrefslogtreecommitdiff
path: root/lib/ui/tab.go
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-05-27 07:37:02 +0200
committerReto Brunner <reto@labrat.space>2020-05-27 07:57:10 +0200
commit0f78f06610c0e8887aba2ae50e99b86477a384b3 (patch)
treeff4cd6581d3af0911954a37550602366d2bb0e2f /lib/ui/tab.go
parent6c4ed3cfe2fe66a1e5f26c404ea90e048142db72 (diff)
downloadaerc-0f78f06610c0e8887aba2ae50e99b86477a384b3.zip
Add Style configuration
The following functionalities are added to configure aerc ui styles. - Read stylesets from file with very basic fnmatch wildcard matching - Add default styleset - Support different stylesets as part of UiConfig allowing contextual styles. - Move widgets/ui elements to use the stylesets. - Add configuration manual for the styleset
Diffstat (limited to 'lib/ui/tab.go')
-rw-r--r--lib/ui/tab.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/ui/tab.go b/lib/ui/tab.go
index 4b99e4b..cd5f448 100644
--- a/lib/ui/tab.go
+++ b/lib/ui/tab.go
@@ -283,9 +283,9 @@ 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 := strip.uiConfig.GetStyle(config.STYLE_TAB)
if strip.Selected == i {
- style = tcell.StyleDefault
+ style = strip.uiConfig.GetStyleSelected(config.STYLE_TAB)
}
tabWidth := 32
if ctx.Width()-x < tabWidth {
@@ -301,8 +301,8 @@ func (strip *TabStrip) Draw(ctx *Context) {
break
}
}
- style := tcell.StyleDefault.Reverse(true)
- ctx.Fill(x, 0, ctx.Width()-x, 1, ' ', style)
+ ctx.Fill(x, 0, ctx.Width()-x, 1, ' ',
+ strip.uiConfig.GetStyle(config.STYLE_TAB))
}
func (strip *TabStrip) Invalidate() {
@@ -386,7 +386,8 @@ func (content *TabContent) Draw(ctx *Context) {
if content.Selected >= len(content.Tabs) {
width := ctx.Width()
height := ctx.Height()
- ctx.Fill(0, 0, width, height, ' ', tcell.StyleDefault)
+ ctx.Fill(0, 0, width, height, ' ',
+ content.uiConfig.GetStyle(config.STYLE_TAB))
}
tab := content.Tabs[content.Selected]