diff options
author | Michael Muré <batolettre@gmail.com> | 2018-09-26 22:03:58 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-09-26 22:03:58 +0200 |
commit | 5b3a8f01f06811a1f68278a759f18092fd7f1779 (patch) | |
tree | d15c79a78b6e20534a07a06dedd65a907b231793 /termui | |
parent | 66f3b37c945c2a8703fc8874ddaa42d771e906d3 (diff) | |
download | git-bug-5b3a8f01f06811a1f68278a759f18092fd7f1779.tar.gz |
termui: better responsive columns in the bug table
Diffstat (limited to 'termui')
-rw-r--r-- | termui/bug_table.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/termui/bug_table.go b/termui/bug_table.go index 4ac2ce83..a60e226e 100644 --- a/termui/bug_table.go +++ b/termui/bug_table.go @@ -274,13 +274,12 @@ func (bt *bugTable) getColumnWidths(maxX int) map[string]int { left := maxX - 5 - m["id"] - m["status"] - m["summary"] = maxInt(11, left/6) + m["summary"] = 14 left -= m["summary"] - - m["lastEdit"] = maxInt(19, left/6) + m["lastEdit"] = 19 left -= m["lastEdit"] - m["author"] = maxInt(left*2/5, 15) + m["author"] = minInt(maxInt(left/3, 15), 10+left/8) m["title"] = maxInt(left-m["author"], 10) return m |