chore(tui): visual polish — detail sections, column headers, alert detail #37
@@ -439,6 +439,10 @@ func (m Model) computeLayout() tableLayout {
|
||||
widths[i] = w
|
||||
}
|
||||
|
||||
if surplus > 0 {
|
||||
widths[6] += surplus
|
||||
}
|
||||
|
||||
return tableLayout{
|
||||
nameW: nameW,
|
||||
sparkW: sparkW,
|
||||
|
||||
@@ -51,7 +51,7 @@ func (m Model) renderTable(headers []string, items int, buildRows func(start, en
|
||||
style = tableSelectedStyle.Foreground(s.GetForeground())
|
||||
}
|
||||
if col < len(colWidths) && colWidths[col] > 0 {
|
||||
style = style.Width(colWidths[col])
|
||||
style = style.Width(colWidths[col]).MaxWidth(colWidths[col])
|
||||
}
|
||||
return style
|
||||
}
|
||||
@@ -64,7 +64,7 @@ func (m Model) renderTable(headers []string, items int, buildRows func(start, en
|
||||
base = tableSelectedStyle
|
||||
}
|
||||
if col < len(colWidths) && colWidths[col] > 0 {
|
||||
base = base.Width(colWidths[col])
|
||||
base = base.Width(colWidths[col]).MaxWidth(colWidths[col])
|
||||
}
|
||||
return base
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user