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

color fixups

This commit is contained in:
Jesse Duffield
2021-08-01 16:02:49 +10:00
parent 123d624141
commit d626bcac00
10 changed files with 28 additions and 27 deletions

View File

@ -27,11 +27,11 @@ func getBranchDisplayStrings(b *models.Branch, fullDescription bool, diffed bool
displayName = b.DisplayName
}
nameColorAttr := GetBranchColor(b.Name)
nameTextStyle := GetBranchTextStyle(b.Name)
if diffed {
nameColorAttr = theme.DiffTerminalColor
nameTextStyle = theme.DiffTerminalColor
}
coloredName := nameColorAttr.Sprint(displayName)
coloredName := nameTextStyle.Sprint(displayName)
if b.IsTrackingRemote() {
coloredName = fmt.Sprintf("%s %s", coloredName, ColoredBranchStatus(b))
}
@ -48,8 +48,8 @@ func getBranchDisplayStrings(b *models.Branch, fullDescription bool, diffed bool
return res
}
// GetBranchColor branch color
func GetBranchColor(name string) style.TextStyle {
// GetBranchTextStyle branch color
func GetBranchTextStyle(name string) style.TextStyle {
branchType := strings.Split(name, "/")[0]
switch branchType {