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/gui/presentation | |
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/gui/presentation')
-rw-r--r-- | pkg/gui/presentation/commits.go | 6 | ||||
-rw-r--r-- | pkg/gui/presentation/reflog_commits.go | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go index 0743fd14e..de1d168dc 100644 --- a/pkg/gui/presentation/commits.go +++ b/pkg/gui/presentation/commits.go @@ -10,8 +10,6 @@ import ( "github.com/kyokomi/emoji/v2" ) -var cherryPickedCommitTextStyle = style.FgCyan.MergeStyle(style.BgBlue) - func GetCommitListDisplayStrings(commits []*models.Commit, fullDescription bool, cherryPickedCommitShaMap map[string]bool, diffName string, parseEmoji bool) [][]string { lines := make([][]string, len(commits)) @@ -51,7 +49,7 @@ func getFullDescriptionDisplayStringsForCommit(c *models.Commit, cherryPickedCom // for some reason, setting the background to blue pads out the other commits // horizontally. For the sake of accessibility I'm considering this a feature, // not a bug - shaColor = cherryPickedCommitTextStyle + shaColor = theme.CherryPickedCommitTextStyle } tagString := "" @@ -98,7 +96,7 @@ func getDisplayStringsForCommit(c *models.Commit, cherryPickedCommitShaMap map[s // for some reason, setting the background to blue pads out the other commits // horizontally. For the sake of accessibility I'm considering this a feature, // not a bug - shaColor = cherryPickedCommitTextStyle + shaColor = theme.CherryPickedCommitTextStyle } actionString := "" diff --git a/pkg/gui/presentation/reflog_commits.go b/pkg/gui/presentation/reflog_commits.go index b6b21e90f..fd843d884 100644 --- a/pkg/gui/presentation/reflog_commits.go +++ b/pkg/gui/presentation/reflog_commits.go @@ -29,7 +29,7 @@ func GetReflogCommitListDisplayStrings(commits []*models.Commit, fullDescription func coloredReflogSha(c *models.Commit, cherryPickedCommitShaMap map[string]bool) string { shaColor := style.FgBlue if cherryPickedCommitShaMap[c.Sha] { - shaColor = cherryPickedCommitTextStyle + shaColor = theme.CherryPickedCommitTextStyle } return shaColor.Sprint(c.ShortSha()) |