biolab / orange3

🍊 :bar_chart: :bulb: Orange: Interactive data analysis
https://orangedatamining.com
Other
4.85k stars 1.01k forks source link

OWDatasets: Reduce width #5091

Closed irgolic closed 3 years ago

irgolic commented 3 years ago

The widget is quite big at the moment, and many of the columns could be narrower by default.

Current Screenshot 2020-11-19 at 17 00 56

Possible solution Screenshot 2020-11-19 at 17 01 11

The sizeHint should not be set on the widget itself, it should be set on the table. To calculate it, each column's preferred width should be calculated by checking its values, and it should be clamped to a maximum value (i.e., long titles should elide).

ajdapretnar commented 3 years ago

Currently, if using sizeHintForColumn, the view doesn't change. I could not find a solution other than hardcoding the upper limit, which I don't think is desirable. Suggestions?

irgolic commented 3 years ago

Did you comment out the widget's sizeHint?

ajdapretnar commented 3 years ago

Commenting it out just "breaks" the view, not column width. Namely the window isn't wide enough. Columns, when resizing the window, are still too wide.