mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Right-align key labels in menu
I find this makes it look a little nicer
This commit is contained in:
@ -42,7 +42,7 @@ func LongAuthor(authorName string) string {
|
||||
return value
|
||||
}
|
||||
|
||||
paddedAuthorName := utils.WithPadding(authorName, 17)
|
||||
paddedAuthorName := utils.WithPadding(authorName, 17, utils.AlignLeft)
|
||||
truncatedName := utils.TruncateWithEllipsis(paddedAuthorName, 17)
|
||||
value := AuthorStyle(authorName).Sprint(truncatedName)
|
||||
authorNameCache[authorName] = value
|
||||
|
@ -35,7 +35,7 @@ func getBranchDisplayStrings(b *models.Branch, fullDescription bool, diffed bool
|
||||
}
|
||||
|
||||
coloredName := nameTextStyle.Sprint(displayName)
|
||||
branchStatus := utils.WithPadding(ColoredBranchStatus(b, tr), 2)
|
||||
branchStatus := utils.WithPadding(ColoredBranchStatus(b, tr), 2, utils.AlignLeft)
|
||||
coloredName = fmt.Sprintf("%s %s", coloredName, branchStatus)
|
||||
|
||||
recencyColor := style.FgCyan
|
||||
|
@ -283,7 +283,7 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
|
||||
s.showYouAreHereLabel,
|
||||
)
|
||||
|
||||
renderedResult := utils.RenderDisplayStrings(result)
|
||||
renderedResult := utils.RenderDisplayStrings(result, nil)
|
||||
t.Logf("\n%s", renderedResult)
|
||||
|
||||
assert.EqualValues(t, s.expected, renderedResult)
|
||||
|
Reference in New Issue
Block a user