From 02fef3136f27a0a93352ee62f47d4924e54389dd Mon Sep 17 00:00:00 2001 From: mjarkk Date: Fri, 18 Oct 2019 09:48:37 +0200 Subject: Added light theme option to the settings --- pkg/commands/branch.go | 4 +++- pkg/commands/commit.go | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'pkg/commands') diff --git a/pkg/commands/branch.go b/pkg/commands/branch.go index cbcab2712..d1cafdfb4 100644 --- a/pkg/commands/branch.go +++ b/pkg/commands/branch.go @@ -4,6 +4,8 @@ import ( "fmt" "strings" + "github.com/jesseduffield/lazygit/pkg/theme" + "github.com/fatih/color" "github.com/jesseduffield/lazygit/pkg/utils" ) @@ -38,7 +40,7 @@ func (b *Branch) GetColor() color.Attribute { case "hotfix": return color.FgRed default: - return color.FgWhite + return theme.DefaultTextColor } } diff --git a/pkg/commands/commit.go b/pkg/commands/commit.go index e8a0a52e7..4102af4c0 100644 --- a/pkg/commands/commit.go +++ b/pkg/commands/commit.go @@ -2,6 +2,7 @@ package commands import ( "github.com/fatih/color" + "github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/utils" ) @@ -22,7 +23,7 @@ func (c *Commit) GetDisplayStrings(isFocused bool) []string { green := color.New(color.FgGreen) blue := color.New(color.FgBlue) cyan := color.New(color.FgCyan) - white := color.New(color.FgWhite) + defaultColor := color.New(theme.DefaultTextColor) magenta := color.New(color.FgMagenta) // for some reason, setting the background to blue pads out the other commits @@ -43,7 +44,7 @@ func (c *Commit) GetDisplayStrings(isFocused bool) []string { case "selected": shaColor = magenta default: - shaColor = white + shaColor = defaultColor } if c.Copied { @@ -55,5 +56,5 @@ func (c *Commit) GetDisplayStrings(isFocused bool) []string { actionString = cyan.Sprint(utils.WithPadding(c.Action, 7)) + " " } - return []string{shaColor.Sprint(c.Sha), actionString + white.Sprint(c.Name)} + return []string{shaColor.Sprint(c.Sha), actionString + defaultColor.Sprint(c.Name)} } -- cgit v1.2.3