1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Row color as common function

This commit is contained in:
Chris Cummer
2018-05-14 20:45:18 -07:00
parent 0d3b663642
commit 0ff65bbd5c
3 changed files with 13 additions and 22 deletions

View File

@@ -64,7 +64,7 @@ func (widget *Widget) contentFrom(searchResult *SearchResult) string {
widget.issueTypeColor(&issue),
issue.IssueFields.IssueType.Name,
issue.Key,
widget.rowColor(idx),
wtf.RowColor("jira", idx),
issue.IssueFields.Summary,
)
}
@@ -88,13 +88,3 @@ func (widget *Widget) issueTypeColor(issue *Issue) string {
return color
}
func (widget *Widget) rowColor(idx int) string {
rowCol := Config.UString("wtf.mods.jira.colors.row.even", "lightblue")
if idx%2 == 0 {
rowCol = Config.UString("wtf.mods.jira.colors.row.odd", "white")
}
return rowCol
}