TabViewer / tabview

Python curses command line CSV and tabular data viewer
Other
460 stars 49 forks source link

Limit variable modes to column heading width #143

Open Llammissar opened 7 years ago

Llammissar commented 7 years ago

Regardless of whether I'm using max or mode, I pretty much always want to see the whole column heading. The way things are now, I can't really use either lately because we have a bunch of columns with a mode of 1 and max of 2 or 3.

wavexx commented 7 years ago

On Thu, Mar 16 2017, Wyatt wrote:

Regardless of whether I'm using max or mode, I pretty much always want to see the whole column heading. The way things are now, I can't really use either lately because we have a bunch of columns with a mode of 1 and max of 2 or 3.

In gtabview I reworked a bit how column widths are calculated, but sadly I didn't have time lately to do anything on tabview :/

If the width of the label is up to 2/3 of the width of the column, I widen the column so that the label is fully visible. I also had to introduce a minimal column width, since with a GUI the minimal column width could be 1 pixel.

It would be nice if you could give it a spin and see if you like how columns are sized.

I also calculate column widths by using a time limit (~250ms for all visible columns if I recall correctly). This ensures that, on large datasets, we get responsive autosizing. We should do the same in tabview.

On the other hand I never got to the point of adding "mode" sizing, which I truly love in tabview when working with mixed datasets :/