Custom columns: reusing width from other columns

Here you can propose new features, make suggestions etc.

Moderators: Stefan2, white, sheep, Hacker

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

Custom columns: reusing width from other columns

Post by *DrShark » 2019-03-05, 22:21 UTC

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.
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
Usher
Senior Member
Senior Member
Posts: 434
Joined: 2011-03-11, 10:11 UTC

Re: Custm columns: reusing width from other columns

Post by *Usher » 2019-04-09, 16:28 UTC

Just one question: how do you want to prevent recursion?
Regards from Poland
Andrzej P. Wozniak

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

Re: Custm columns: reusing width from other columns

Post by *DrShark » 2019-04-15, 16:38 UTC

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.)
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
Usher
Senior Member
Senior Member
Posts: 434
Joined: 2011-03-11, 10:11 UTC

Re: Custm columns: reusing width from other columns

Post by *Usher » 2019-04-15, 18:03 UTC

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…
Regards from Poland
Andrzej P. Wozniak

Post Reply