1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

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
This commit is contained in:
Sam Burville
2021-09-29 12:53:31 +01:00
committed by Jesse Duffield
parent 663c036ca5
commit c5f7ad5adb
5 changed files with 25 additions and 11 deletions

View File

@ -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)