rizinorg / cutter

Free and Open Source Reverse Engineering Platform powered by rizin
https://cutter.re
GNU General Public License v3.0
15.32k stars 1.14k forks source link

Improve column autosizing #3343

Open karliss opened 1 month ago

karliss commented 1 month ago

Is your feature request related to a problem? Please describe.

Multiple panels in Cutter are using the same function for autosizing column width based on content. It somewhat solves the issue of hardcoded default width being too small.

The problem is that if some of table entries contain very long text, that stretches the whole table horizontally to the point where it becomes impractical.

It's always possible for user to manually adjust column width, but cutter should do it's best to minimize the situations where it's necessary.

With the current behavior once a column gets assigned width greater than table width, it becomes a bit finicky to even manually resize it. It's easier to manually make a narrow column wider, than the opposite. Having many columns to wide also makes it easier to not notices that there are more columns if you don't pay attention to horizontal scrollbar.

Describe the solution you'd like

Add a bit more logic to column autosizing function to reduce the chance of badly chosen default column width:

Describe alternatives you've considered

Additional context