diff options
author | mjarkk <mkopenga@gmail.com> | 2019-10-18 09:48:37 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-10-20 12:32:57 +1100 |
commit | 02fef3136f27a0a93352ee62f47d4924e54389dd (patch) | |
tree | 1be96988ffda2cc6f29c1d06ebf60d8677c5121c /pkg/gui/gui.go | |
parent | 8fe0e00cd9484c231c79c77ad3bc3dd601f0451a (diff) |
Added light theme option to the settings
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 20c247fa1..6430b19f7 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -24,6 +24,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/i18n" + "github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/updates" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/sirupsen/logrus" @@ -374,6 +375,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { _, _ = g.SetViewOnBottom("limit") g.DeleteView("limit") + textColor := theme.GocuiDefaultTextColor v, err := g.SetView("main", leftSideWidth+panelSpacing, 0, width-1, height-2, gocui.LEFT) if err != nil { if err.Error() != "unknown view" { @@ -381,7 +383,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { } v.Title = gui.Tr.SLocalize("DiffTitle") v.Wrap = true - v.FgColor = gocui.ColorWhite + v.FgColor = textColor } if v, err := g.SetView("status", 0, 0, leftSideWidth, vHeights["status"]-1, gocui.BOTTOM|gocui.RIGHT); err != nil { @@ -389,7 +391,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { return err } v.Title = gui.Tr.SLocalize("StatusTitle") - v.FgColor = gocui.ColorWhite + v.FgColor = textColor } filesView, err := g.SetViewBeneath("files", "status", vHeights["files"]) @@ -399,7 +401,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { } filesView.Highlight = true filesView.Title = gui.Tr.SLocalize("FilesTitle") - v.FgColor = gocui.ColorWhite + v.FgColor = textColor } branchesView, err := g.SetViewBeneath("branches", "files", vHeights["branches"]) @@ -408,7 +410,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { return err } branchesView.Title = gui.Tr.SLocalize("BranchesTitle") - branchesView.FgColor = gocui.ColorWhite + branchesView.FgColor = textColor } if v, err := g.SetViewBeneath("commitFiles", "branches", vHeights["commits"]); err != nil { @@ -416,7 +418,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { return err } v.Title = gui.Tr.SLocalize("CommitFiles") - v.FgColor = gocui.ColorWhite + v.FgColor = textColor } commitsView, err := g.SetViewBeneath("commits", "branches", vHeights["commits"]) @@ -425,7 +427,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { return err } commitsView.Title = gui.Tr.SLocalize("CommitsTitle") - commitsView.FgColor = gocui.ColorWhite + commitsView.FgColor = textColor } stashView, err := g.SetViewBeneath("stash", "commits", vHeights["stash"]) @@ -434,7 +436,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { return err } stashView.Title = gui.Tr.SLocalize("StashTitle") - stashView.FgColor = gocui.ColorWhite + stashView.FgColor = textColor } if v, err := g.SetView("options", appStatusOptionsBoundary-1, height-2, optionsVersionBoundary-1, height, 0); err != nil { @@ -442,9 +444,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { return err } v.Frame = false - if v.FgColor, err = gui.GetOptionsPanelTextColor(); err != nil { - return err - } + v.FgColor = gui.GetOptionsPanelTextColor() } if gui.getCommitMessageView() == nil { @@ -455,7 +455,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { } g.SetViewOnBottom("commitMessage") commitMessageView.Title = gui.Tr.SLocalize("CommitMessage") - commitMessageView.FgColor = gocui.ColorWhite + commitMessageView.FgColor = textColor commitMessageView.Editable = true } } @@ -471,7 +471,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { return err } credentialsView.Title = gui.Tr.SLocalize("CredentialsUsername") - credentialsView.FgColor = gocui.ColorWhite + credentialsView.FgColor = textColor credentialsView.Editable = true } } |