From 37997dcbcd3797f841bebe7d96ab9a1e0814cff3 Mon Sep 17 00:00:00 2001 From: Arnaud PERALTA Date: Sun, 20 Nov 2022 19:05:42 +0100 Subject: [PATCH 1/2] [#2279] defaultFgColor entry in theme config --- docs/Config.md | 2 ++ pkg/config/user_config.go | 2 ++ pkg/theme/theme.go | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/Config.md b/docs/Config.md index aa5ceaaf9..c093377d1 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -46,6 +46,8 @@ gui: - blue unstagedChangesColor: - red + defaultFgColor: + - white commitLength: show: true mouseEvents: true diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index c31c74fe0..52d034f43 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -63,6 +63,7 @@ type ThemeConfig struct { CherryPickedCommitBgColor []string `yaml:"cherryPickedCommitBgColor"` CherryPickedCommitFgColor []string `yaml:"cherryPickedCommitFgColor"` UnstagedChangesColor []string `yaml:"unstagedChangesColor"` + DefaultFgColor []string `yaml:"defaultFgColor"` } type CommitLengthConfig struct { @@ -365,6 +366,7 @@ func GetDefaultConfig() *UserConfig { CherryPickedCommitBgColor: []string{"cyan"}, CherryPickedCommitFgColor: []string{"blue"}, UnstagedChangesColor: []string{"red"}, + DefaultFgColor: []string{"default"}, }, CommitLength: CommitLengthConfig{Show: true}, SkipNoStagedFilesWarning: false, diff --git a/pkg/theme/theme.go b/pkg/theme/theme.go index 0970e08b7..62df8b50d 100644 --- a/pkg/theme/theme.go +++ b/pkg/theme/theme.go @@ -58,6 +58,6 @@ func UpdateTheme(themeConfig config.ThemeConfig) { OptionsColor = GetGocuiStyle(themeConfig.OptionsTextColor) OptionsFgColor = GetTextStyle(themeConfig.OptionsTextColor, false) - DefaultTextColor = style.FgDefault - GocuiDefaultTextColor = gocui.ColorDefault + DefaultTextColor = GetTextStyle(themeConfig.DefaultFgColor, false) + GocuiDefaultTextColor = GetGocuiStyle(themeConfig.DefaultFgColor) } From 03ce22f3c94955aa5f88decbeb48bdbdb27eb8fd Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 26 Nov 2022 13:39:00 +1100 Subject: [PATCH 2/2] Update docs/Config.md --- docs/Config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Config.md b/docs/Config.md index c093377d1..691f791f5 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -47,7 +47,7 @@ gui: unstagedChangesColor: - red defaultFgColor: - - white + - default commitLength: show: true mouseEvents: true