Skip to content

Commit

Permalink
Be more clear if selected or not
Browse files Browse the repository at this point in the history
  • Loading branch information
nakabonne committed May 4, 2020
1 parent c0c11bb commit 120532c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pkg/gui/item/linters.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
)

const (
DefaultLinterColor = tcell.ColorAqua
EnabledLinterColor = tcell.ColorYellow
DefaultLinterColor = tcell.ColorRed
EnabledLinterColor = tcell.ColorLime
)

type Linters struct {
Expand Down
12 changes: 6 additions & 6 deletions pkg/gui/item/source_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
)

const (
DefaultDirColor = tcell.ColorAqua
SelectedDirColor = tcell.ColorYellow
DefaultDirColor = tcell.ColorRed
SelectedDirColor = tcell.ColorLime
)

type SourceFiles struct {
Expand Down Expand Up @@ -67,12 +67,12 @@ func (s *SourceFiles) addChildren(node *tview.TreeNode, path string) error {
return err
}
for _, file := range files {
if !file.IsDir() {
continue
}
child := tview.NewTreeNode(file.Name()).
SetReference(filepath.Join(path, file.Name())).
SetSelectable(file.IsDir())
if file.IsDir() {
child.SetColor(DefaultDirColor)
}
SetSelectable(file.IsDir()).SetColor(DefaultDirColor)
node.AddChild(child)
}
return nil
Expand Down

0 comments on commit 120532c

Please sign in to comment.