diff options
author | Sam Burville <Sam.Burville@GlobalProcessing.com> | 2021-09-29 12:53:31 +0100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-09-30 01:26:05 +1000 |
commit | c5f7ad5adb00b73acd44a086687ffbe5d7705aa2 (patch) | |
tree | 15948daa416d8e5adaff4105241304acbb859d5b /pkg/theme/theme.go | |
parent | 663c036ca5c5639c772a3f37ccef50ff03979337 (diff) |
Make cherry pick commit color customisable
Two new settings in the config, which allow the cherry picked
foreground and background to be custom colors.
Issue #856
Diffstat (limited to 'pkg/theme/theme.go')
-rw-r--r-- | pkg/theme/theme.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/theme/theme.go b/pkg/theme/theme.go index b19af5e54..ba2848254 100644 --- a/pkg/theme/theme.go +++ b/pkg/theme/theme.go @@ -32,6 +32,9 @@ var ( // SelectedRangeBgColor is the background color of the selected range of lines SelectedRangeBgColor = style.New() + + // CherryPickedCommitColor is the text style when cherry picking a commit + CherryPickedCommitTextStyle = style.New() OptionsFgColor = style.New() @@ -44,6 +47,11 @@ func UpdateTheme(themeConfig config.ThemeConfig) { InactiveBorderColor = GetGocuiStyle(themeConfig.InactiveBorderColor) SelectedLineBgColor = GetTextStyle(themeConfig.SelectedLineBgColor, true) SelectedRangeBgColor = GetTextStyle(themeConfig.SelectedRangeBgColor, true) + + var cherryPickedCommitBgTextStyle = GetTextStyle(themeConfig.CherryPickedCommitBgColor, true) + var cherryPickedCommitFgTextStyle = GetTextStyle(themeConfig.CherryPickedCommitFgColor, false) + CherryPickedCommitTextStyle = cherryPickedCommitBgTextStyle.MergeStyle(cherryPickedCommitFgTextStyle) + GocuiSelectedLineBgColor = GetGocuiStyle(themeConfig.SelectedLineBgColor) OptionsColor = GetGocuiStyle(themeConfig.OptionsTextColor) OptionsFgColor = GetTextStyle(themeConfig.OptionsTextColor, false) |