aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ui/table.go
Commit message (Collapse)AuthorAgeFilesLines
* ui/table: do not require width at constructionRobin Jarry2023-02-201-8/+6
| | | | | | | | | The width is only required when rendering the table in Draw. Remove the redundant width attribute. Fixes: 012be0192c88 ("ui: add reusable table widget") Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* ui/table: allow zero width columnsRobin Jarry2023-02-201-4/+7
| | | | | | | | | | | | | When a column uses WIDTH_FIT and its contents are empty, the column is not rendered at all, neither is its separator. This can cause display artifacts (interruption of background color, etc.). Make sure to differentiate between zero-width columns and columns that overflow screen width. Fixes: 012be0192c88 ("ui: add reusable table widget") Acked-by: Tim Culverhouse <tim@timculverhouse.com> Signed-off-by: Robin Jarry <robin@jarry.cc>
* ui: add reusable table widgetRobin Jarry2023-01-041-0/+210
This will be used by the message list index and by the status line. A table is constructed from rows/width dimensions, a list of column definitions and a column separator. Provide functions to parse column definitions from ini config files. This will be used in the next commit. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>