diff --git a/docs/Config.md b/docs/Config.md index 82e36ec5b..aa5ceaaf9 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -29,7 +29,6 @@ gui: language: 'auto' # one of 'auto' | 'en' | 'zh' | 'pl' | 'nl' | 'ja' | 'ko' timeFormat: '02 Jan 06 15:04 MST' # https://pkg.go.dev/time#Time.Format theme: - lightTheme: false # For terminals with a light background activeBorderColor: - green - bold @@ -344,23 +343,6 @@ The available attributes are: - reverse # useful for high-contrast - underline -## Light terminal theme - -If you have issues with a light terminal theme where you can't read / see the text add these settings - -```yaml -gui: - theme: - lightTheme: true - activeBorderColor: - - black - - bold - inactiveBorderColor: - - black - selectedLineBgColor: - - default -``` - ## Highlighting the selected line If you don't like the default behaviour of highlighting the selected line with a blue background, you can use the `selectedLineBgColor` and `selectedRangeBgColor` keys to customise the behaviour. If you just want to embolden the selected line (this was the original default), you can do the following: diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index a90b100d5..c31c74fe0 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -55,7 +55,6 @@ type GuiConfig struct { } type ThemeConfig struct { - LightTheme bool `yaml:"lightTheme"` ActiveBorderColor []string `yaml:"activeBorderColor"` InactiveBorderColor []string `yaml:"inactiveBorderColor"` OptionsTextColor []string `yaml:"optionsTextColor"` @@ -358,9 +357,8 @@ func GetDefaultConfig() *UserConfig { Language: "auto", TimeFormat: time.RFC822, Theme: ThemeConfig{ - LightTheme: false, ActiveBorderColor: []string{"green", "bold"}, - InactiveBorderColor: []string{"white"}, + InactiveBorderColor: []string{"default"}, OptionsTextColor: []string{"blue"}, SelectedLineBgColor: []string{"blue"}, SelectedRangeBgColor: []string{"blue"}, diff --git a/pkg/gui/style/basic_styles.go b/pkg/gui/style/basic_styles.go index 99db37e20..e37e90001 100644 --- a/pkg/gui/style/basic_styles.go +++ b/pkg/gui/style/basic_styles.go @@ -27,6 +27,7 @@ var ( BgBlue = FromBasicBg(color.BgBlue) BgMagenta = FromBasicBg(color.BgMagenta) BgCyan = FromBasicBg(color.BgCyan) + BgDefault = FromBasicBg(color.BgDefault) // will not print any colour escape codes, including the reset escape code Nothing = New() diff --git a/pkg/theme/theme.go b/pkg/theme/theme.go index 39347702a..0970e08b7 100644 --- a/pkg/theme/theme.go +++ b/pkg/theme/theme.go @@ -24,9 +24,6 @@ var ( // DefaultTextColor is the default text color DefaultTextColor = style.FgWhite - // DefaultHiTextColor is the default highlighted text color - DefaultHiTextColor = style.FgLightWhite - // SelectedLineBgColor is the background color for the selected line SelectedLineBgColor = style.New() @@ -61,14 +58,6 @@ func UpdateTheme(themeConfig config.ThemeConfig) { OptionsColor = GetGocuiStyle(themeConfig.OptionsTextColor) OptionsFgColor = GetTextStyle(themeConfig.OptionsTextColor, false) - isLightTheme := themeConfig.LightTheme - if isLightTheme { - DefaultTextColor = style.FgBlack - DefaultHiTextColor = style.FgBlackLighter - GocuiDefaultTextColor = gocui.ColorBlack - } else { - DefaultTextColor = style.FgWhite - DefaultHiTextColor = style.FgLightWhite - GocuiDefaultTextColor = gocui.ColorWhite - } + DefaultTextColor = style.FgDefault + GocuiDefaultTextColor = gocui.ColorDefault }