Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

fix(widgets/table): improve computation of table column widths #514

Merged
merged 2 commits into from Aug 1, 2021

Conversation

fdehau
Copy link
Owner

@fdehau fdehau commented Aug 1, 2021

Description

The sum of the columns widths returned by Table::get_column_widths can sometimes be greater than the available width. This is happening because we are not feeding enough constraints to the cassowary solver. At the same time we already have an abstraction over cassowary which is used everywhere else: Layout. Therefore, I've replaced the manual column widths computation by a call to Layout.

Fixes #470

Testing guidelines

A regression test provided in #508 was used to test the solution.

Checklist

@fdehau fdehau mentioned this pull request Aug 1, 2021
3 tasks
@fdehau fdehau merged commit a68e38e into master Aug 1, 2021
@fdehau fdehau deleted the florian.dehau/table-column-widths branch August 1, 2021 14:46
jli added a commit to jli/sparktop that referenced this pull request Aug 22, 2021
seems to have changed with tui 0.16.0
fdehau/tui-rs#514
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table widget panics when table doesnt fit screen
1 participant