Custom columns: reusing width from other columns

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Custom columns: reusing width from other columns

Post by *DrShark »

Currently it's possible only to set a column width as a number in dialog units (either by moving the column separators in panels, or by writing a width number in Custom Columns set configuration window.

I suggest in addition to dialog units use as a column width also word as a "link" to a width of other column. This is especially useful if custom column set uses some of built-in Default or Comment view columns (File, Size, Date, Attr; Comment.)
For example, if we'll use a word Size instead of dialog units, our custom column will have a width of a Size column from default view.

In addition to taking width from built-in views, in a similar way it could be possible to re-use the width of other column from current column set. Here we could use 2 methods: a number with special character (to avoid confusion with dialog units), f. ex. #3 to re-use the with of column №3, or a quoted word (quotes to avoid conflict with above method to reuse default column widths), f.ex. "Size" is to re-use the width of a column with that (unquoted) name from current colums set (words will work only if such column name will be unique in current columns set.) This addition will allow to change a width of several columns by changing only one with mouse in panels (all other columns that "link" to a coulumn width of which we're changing, will change their widths to same value.)
Last edited by DrShark on 2019-04-16, 11:41 UTC, edited 1 time in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Custm columns: reusing width from other columns

Post by *Usher »

Just one question: how do you want to prevent recursion?
Andrzej P. Wozniak
Polish subforum moderator
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Custm columns: reusing width from other columns

Post by *DrShark »

Usher wrote: 2019-04-09, 16:28 UTC Just one question: how do you want to prevent recursion?
TC can stop using referenced width sizes on first detected recursion (and use default width instead.)
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Custm columns: reusing width from other columns

Post by *Usher »

2DrShark
It's still too general.
1. It may be a long chain of references and it may seriously slow down operations for directories with a lot of files.
2. I think that the only safe way is to refer to full column names, that is plugin-name.property. You can use quite normal arithmetic expressions in this case, f.e. tc.fullname+20, shelldetails.Author*2, 600-tc.ext etc.
3. How do you want to manage sizes when you remove some referenced column from the view?
4. How do you want to manage sizes if for some reason you change TC window size or resize some columns manually? Many people prefer to avoid horizontal scrolling, so increasing some size you should decrease another one (see 600-tc.ext above?).

I think there should be additional parameter for resizing behaviour: keep fixed size, follow the arithmetic expression, make proportional changes etc.
And the solution gets complicated…
Andrzej P. Wozniak
Polish subforum moderator
Post Reply