diff options
Diffstat (limited to 'pkg/theme')
-rw-r--r-- | pkg/theme/style.go | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/pkg/theme/style.go b/pkg/theme/style.go index ba014681a..8f607256d 100644 --- a/pkg/theme/style.go +++ b/pkg/theme/style.go @@ -6,20 +6,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/utils" ) -var colorMap = map[string]struct { - foreground style.TextStyle - background style.TextStyle -}{ - "default": {style.FgWhite, style.BgBlack}, - "black": {style.FgBlack, style.BgBlack}, - "red": {style.FgRed, style.BgRed}, - "green": {style.FgGreen, style.BgGreen}, - "yellow": {style.FgYellow, style.BgYellow}, - "blue": {style.FgBlue, style.BgBlue}, - "magenta": {style.FgMagenta, style.BgMagenta}, - "cyan": {style.FgCyan, style.BgCyan}, - "white": {style.FgWhite, style.BgWhite}, -} +var colorMap = style.ColorMap func GetTextStyle(keys []string, background bool) style.TextStyle { s := style.New() @@ -37,9 +24,9 @@ func GetTextStyle(keys []string, background bool) style.TextStyle { if present { var c style.TextStyle if background { - c = value.background + c = value.Background } else { - c = value.foreground + c = value.Foreground } s = s.MergeStyle(c) } else if utils.IsValidHexValue(key) { |