add static width for specific columns

This commit is contained in:
Bradley Cicenas
2017-03-12 09:58:56 +00:00
parent 77c3d00e67
commit 2134110224
3 changed files with 33 additions and 15 deletions

View File

@@ -99,13 +99,12 @@ func (row *Compact) SetWidth(width int) {
return
}
x := row.X
autoWidth := calcWidth(width, 7)
autoWidth := calcWidth(width)
for n, col := range row.all() {
// set status column to static width
if n == 0 {
if colWidths[n] != 0 {
col.SetX(x)
col.SetWidth(statusWidth)
x += statusWidth
col.SetWidth(colWidths[n])
x += colWidths[n]
continue
}
col.SetX(x)