aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/dirlist.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-05-28 10:32:42 -0400
committerDrew DeVault <sir@cmpwn.com>2020-05-28 10:32:42 -0400
commitcaad1b2c06a0446059ee5ee916e3dce1794b159b (patch)
treeee81255485234137a5902d87d5960ac06618b341 /widgets/dirlist.go
parent76a91813d8dc0f0011202f8120fc197097f022aa (diff)
downloadaerc-caad1b2c06a0446059ee5ee916e3dce1794b159b.tar.gz
Revert "Add Style configuration"
This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
Diffstat (limited to 'widgets/dirlist.go')
-rw-r--r--widgets/dirlist.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go
index 18072fa6..600b38c0 100644
--- a/widgets/dirlist.go
+++ b/widgets/dirlist.go
@@ -194,8 +194,7 @@ func (dirlist *DirectoryList) getRUEString(name string) string {
}
func (dirlist *DirectoryList) Draw(ctx *ui.Context) {
- ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ',
- dirlist.UiConfig().GetStyle(config.STYLE_DIRLIST_DEFAULT))
+ ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', tcell.StyleDefault)
if dirlist.spinner.IsRunning() {
dirlist.spinner.Draw(ctx)
@@ -203,7 +202,7 @@ func (dirlist *DirectoryList) Draw(ctx *ui.Context) {
}
if len(dirlist.dirs) == 0 {
- style := dirlist.UiConfig().GetStyle(config.STYLE_DIRLIST_DEFAULT)
+ style := tcell.StyleDefault
ctx.Printf(0, 0, style, dirlist.UiConfig().EmptyDirlist)
return
}
@@ -213,9 +212,12 @@ func (dirlist *DirectoryList) Draw(ctx *ui.Context) {
if row >= ctx.Height() {
break
}
- style := dirlist.UiConfig().GetStyle(config.STYLE_DIRLIST_DEFAULT)
+ style := tcell.StyleDefault
if name == dirlist.selected {
- style = dirlist.UiConfig().GetStyleSelected(config.STYLE_DIRLIST_DEFAULT)
+ style = style.Reverse(true)
+ } else if name == dirlist.selecting {
+ style = style.Reverse(true)
+ style = style.Foreground(tcell.ColorGray)
}
ctx.Fill(0, row, ctx.Width(), 1, ' ', style)